-
VBScript Fails When I reopen Excel File
I inserted a VBA function into my Excel file to reverse a string in a cell using:
Option Explicit
Public Function ReverseString (Text As String)
ReverseString = StrReverse (Text)
End Function
When I save and close the file then reopen the file the script does not run and I get a NAME? error in the cells. Any Suggestions?
Matt
-
Did you put the function in a normal module?
Did you enable macros when opening (or maybe security is set to high?)
-
hope this helps.
When you use the Option Explicit statement, you must explicitly declare all variables using the Dim, Private, Public, or ReDim statements. If you attempt to use an undeclared variable name, an error occurs.
-Jim
Grand Rapids, MI
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules