Previously, any name not in the visible_names.txt file, and not explicitly declared as visible within your application's code, would be obfuscated.
Version 3.0 introduces an additional avenue to prevent names from being obfuscated: any name that you have not explicitly declared somewhere in your workbook's code is assumed to be an external name and is automatically not obfuscated. Explicit declarations include identifiers associated with variable declarations, function names, subroutine names, property (Get, Set, Let) names, modules, classes, forms, and user defined types.
For example, the name X in the examples below would be seen by Invisible Basic as an explicitly declared name:
Dim X
type X
...
end type
Private X as Double
type Y
X as Integer
end type
Public Property Get X() as Double
...
End Property
Sub X(i as Integer)
...
end Sub
Sub Y()
Dim X as String
...
end sub
In practice, this means that, in most cases, the names of external methods and properties you access from your code will remain unobfuscated, as required, even if you do not explicitly declare such names as visible. In previous versions, explicit declaration of any external names used by your application not already on the visible_names.txt list was always required.
Note that if you have, say, a variable in your application code that has the same as, say, a property of some (non-Excel) external object you are using in your application, then that external object's property will be improperly obfuscated unless you explicitly declare that name as visible (not obfuscated) using the #visible and related directives. Alternately, you could change the name of your program's variable so as to make it different from the property name of the external object. Because such name collisions are likely to be quite rare, in practice, the need to explicitly obfuscate external names used by your application should be all but eliminated.
Finally, note that by using VB's "Option Explicit" in each module, you can automatically assure that each variable name used by your program is explicitly declared. Doing this will maximize the number of names that get obfuscated. If your application uses many implicitly declared variables, such variables, which in previous versions would have been obfuscated, in 3.0 will not be obfuscated unless you add explicit declarations of those variables (it can be as simple as a "Dim X") to your code.
Each time you obfuscate a workbook, Invisible Basic now creates a tab-delimited "secret decoder" file that shows each obfuscated variable name in the first column, and the associated original variable name in the second column. The file is automatically generated (overwriting any previous such file), and has the name:
yourWorkbooksName_secretDecoder.tmp
For example, if the obfuscated workbook is called myWorkbook.xls, the "secret decoder" file would be called:
myWorkbook_secretDecoder.tmp
An excerpt from such a secret decoder file is shown below:
Hidden Original
g tt_identifier
h tt_string
j tt_number
k tt_comment
l tt_whitespace
m tt_guid
n tt_other
o ib_visible_keywords_filename
p alphachars
r underscore
The file type ".tmp" is chosen because the file is overwritten automatically each time you run Invisible Basic, but it is an ordinary tab delimited text file that can be opened with either Notepad or Excel. You may want to change its type to ".txt" if you want to retain it permanently.
If your obfuscated program generates an error that throws you into the debugger, the secret decoder file can provide a quick way to determine the original names of the obfuscated variables that appear on the offending line. Although running the test using source code generated via "Debugging Save Invisibly As" can also provide such information, if you are debugging a problem reported by a user who only has access to the obfuscated code, using the secret decoder file can be more convenient.
Invisible Basic now also removes comments that use the old-style "Rem" commenting convention. Previous versions only removed comments that used the newer, single quote, commenting convention. Examples are shown below:
Rem This comment was incorrectly retained by pre-3.0 versions of Invisible Basic
' Both 3.0 and previous versions would have removed this comment
Commands to visit the Invisible Basic web site (http://invisiblebasic.sourceforge.net) and an "About Invisible Basic" command have been added to Invisible Basic's menu.