Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi, My public variables can't be referenced by sub routines in my modules. The two msgboxes in the code below display them correctly. Public newDataSheet As Worksheet Public nikkeiTime As Date Private Sub Workbook_Open() Set newDataSheet = Workbooks("Historic Data").Worksheets("NewData") nikkeiTime = "00:00:05" MsgBox nikkeiTime MsgBox newDataSheet.name Application.OnTime Now + TimeValue("00:00:01"), "runSchedule" End Sub However the msgboxes in runSchdule are blank, code shown below Sub runSchedule() MsgBox nikkeiTime MsgBox newDataSheet.name End Sub Can anybody help me with this one please? Thanks T:) -- Tomski ------------------------------------------------------------------------ Tomski's Profile: http://www.excelforum.com/member.php...o&userid=26824 View this thread: http://www.excelforum.com/showthread...hreadid=570344 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
public variables | Excel Discussion (Misc queries) | |||
Public variables | Excel Discussion (Misc queries) | |||
Public Variables | Excel Discussion (Misc queries) | |||
Public Variables | Excel Programming | |||
Public Variables | Excel Programming |