Microsoft
Software
Hardware
Network
Question : Excel VBA - Public variable "Out of context"
Hi
I have declared a variable at the top of a module as follows:
Public oNewItem as String
The variable is assigned a value in another module but seems to lose it at the end of the procedure.
When I add a watch I see
at this point.
Thanks
Answer : Excel VBA - Public variable "Out of context"
That means you have defined that same variable name inside the routine. Change it's name in the routine or remove it altogether.
Kevin
Random Solutions
Domain Admin can't login to a vista computer if locked by a user, why?
554_5.1.0_Sender_Denied
Microsoft OLE DB Provider for SQL Server error '80040e31' Timeout expired .
Look up an item across multiple fields in a query
How to create modal dialog in Perl/Tk
cannot execute the NWAdmn32.EXE ?
Replace a primary domain controller procedure question
Windows Search 4.0 XP - UNC locations not adding
Difference between Set chained OFF|ON, Sybase
Using TIBEvents