LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Public variables


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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
public variables johnny Excel Discussion (Misc queries) 7 February 27th 08 03:44 PM
Public variables johnny Excel Discussion (Misc queries) 2 February 24th 08 05:05 AM
Public Variables Jerry McNabb Excel Discussion (Misc queries) 0 February 24th 08 01:26 AM
Public Variables [email protected] Excel Programming 1 September 1st 05 04:14 PM
Public Variables Les Gordon Excel Programming 2 November 11th 04 12:29 PM


All times are GMT +1. The time now is 06:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"