Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Cheers mate.
Thats a big help! -----Original Message----- Hi Russell: Module1: Public strGVar As String Private Sub GInfo1 strGVar = "78982.553896.013" End Sub Module2: Public strGVar2 As String Private Sub GInfo2 strGVar2 = ".00000.1258.0" End Sub ThisWorkbook: Private Sub InfoComb Dim strGString As String strGString = Module1.strGVar & Module2.strGVar2 End Sub Regards, Vasant. "russell" wrote in message ... Howdy all. I have some macro's with defined variables in the ThisWorkbook module, and normal modules Module1 and Module2. All macro's are private so users can't select a macro and run it, for security/corporate reasons. Is there a way to reference a variable which has been defined in Module1 and Module2 from ThisWorkbook? I.e. Module1: Private Sub GInfo1 strGVar = "78982.553896.013" End Sub Module2: Privaate Sub GInfo2 strGVar2 = ".00000.1258.0" End Sub ThisWorkbook: Private Sub InfoComb strGString = strGVar & strGVar2 End Sub Cheers and thanks Russell. . |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Calling name of Sheet as a Variable? | Excel Worksheet Functions | |||
Calling a procudure through variable name | Excel Discussion (Misc queries) | |||
Scope of variable includes all Form _and_ Code modules?? | Excel Programming | |||
saveas calling a variable | Excel Programming | |||
Using the same variable in separate userform modules | Excel Programming |