Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have declared a Public variable in "ThisWorkbook" module level.
Then I gave it a value in the event procedure Workbook_Open() the problem is that when I use this variable in other modules, it is not recognized. anyone knows what is the problem? I want to assign a value to a variable once (at workbook opening or at worksheet opening) then I want to use this variable value in all modules, How to make it/ Thanks in advance. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello Marwan
Declare your variable in a standard module not in Thisworkbook which is private. Assign your value in the Workbook_Open event Regards Pascal "marwan hefnawy" a écrit dans le message de ... I have declared a Public variable in "ThisWorkbook" module level. Then I gave it a value in the event procedure Workbook_Open() the problem is that when I use this variable in other modules, it is not recognized. anyone knows what is the problem? I want to assign a value to a variable once (at workbook opening or at worksheet opening) then I want to use this variable value in all modules, How to make it/ Thanks in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Set Public Variable on Open | Excel Discussion (Misc queries) | |||
protect public sub | Excel Discussion (Misc queries) | |||
Public variables | Excel Discussion (Misc queries) | |||
Public variable | New Users to Excel | |||
Public Curiosity | Excel Discussion (Misc queries) |