View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson[_2_] Chip Pearson[_2_] is offline
external usenet poster
 
Posts: 95
Default Global Variables Not Accessible

John,

Are you declaring the variables in a standard code module? Do you
have Option Explicit at the top of every module? You should be
doing both these things.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"John Baker" wrote in message
...
Hi:

I am trying to define two global variables, thus:

Public wbpath As String
Public timesheet As String

My problem is that this set of commands isn't executing. I set

the values in auto_open
macro, and these two commands are right before the auto_open

macro, but the value of
wbpath isnt recognized by subsequent macros.

Where should I put them to ensure that they execute at startup

of the spreadsheet?

Thanks

John Baker