Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Variable Not Defined
I just received a report from a user testing a workbook in work, that a
variable is not defined in the procedure. What's strange is that the variable is defined. Has anyone else seen this problem and what is the solution. FWIW, I have option explicit on every module and when I compile the code, there are times when errors like this aren't captured. Has anyone seen that as well? Thanks, Barb Reinhardt |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Variable Not Defined
I've seen this problem with arrays
Dim abc as variant and Dim abc() as variant are two diffferent variables. "Barb Reinhardt" wrote: I just received a report from a user testing a workbook in work, that a variable is not defined in the procedure. What's strange is that the variable is defined. Has anyone else seen this problem and what is the solution. FWIW, I have option explicit on every module and when I compile the code, there are times when errors like this aren't captured. Has anyone seen that as well? Thanks, Barb Reinhardt |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Variable Not Defined
I have definitely seen the situation where I have Option Explicit, as I
always do, and a non-declared variable is not picked up on compile. When executing the code, it only gets picked up when that path is traversed. I have never been able to spot a common situation, but it is far more regular than I would like. Bob "Barb Reinhardt" wrote in message ... I just received a report from a user testing a workbook in work, that a variable is not defined in the procedure. What's strange is that the variable is defined. Has anyone else seen this problem and what is the solution. FWIW, I have option explicit on every module and when I compile the code, there are times when errors like this aren't captured. Has anyone seen that as well? Thanks, Barb Reinhardt |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Variable Not Defined
Oh, as an aside I have a line similar to this in all procedures
Const mpProcedure As String = "procedure_name" which also fails regulalrly on compile, and I have to remove that line and re-type it. Then all is well (?). -- __________________________________ HTH Bob "Barb Reinhardt" wrote in message ... I just received a report from a user testing a workbook in work, that a variable is not defined in the procedure. What's strange is that the variable is defined. Has anyone else seen this problem and what is the solution. FWIW, I have option explicit on every module and when I compile the code, there are times when errors like this aren't captured. Has anyone seen that as well? Thanks, Barb Reinhardt |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Variable not defined? | Excel Programming | |||
Public Variable - not defined? | Excel Programming | |||
variable not defined | Excel Programming | |||
For Each cell - Variable not defined (VBA) | Excel Programming | |||
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? | Excel Worksheet Functions |