Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can any tell me how to pass a module declared variable toa worksheet event.
In this instance a Before Double Click event TIA John Howard Sydney, Australia |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This is an example:
1. Insert a module and declare a variable Public Const xx = 100 2. In your Sheet module, the event is: Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) MsgBox Module1.xx End Sub The MsgBox line prefixes the reference to the variable xx by the module name. If you have only one module, the prefix is unnecessary although its presence may be helpful in debugging. "SMS - John Howard" wrote: Can any tell me how to pass a module declared variable toa worksheet event. In this instance a Before Double Click event TIA John Howard Sydney, Australia |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Declaring variables in Module vs. Public | Excel Discussion (Misc queries) | |||
Where?Worksheet code module or Worksheet_SelectionChange event han | Excel Worksheet Functions | |||
Passing Strings from UserForm to Module | Excel Programming | |||
Passing variables from module to userform | Excel Programming | |||
Passing ARGUMENTS between event procedures of a USERFORM | Excel Programming |