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: 206
Default global 'path' declaration

Hi all

i need to have a global 'path' that all of my functions and subs have access
to, so that if i want to change the path, i need to change it only in one
place

i have

const docPath="C:\Temp\"

defined in ThisWorkbook, but when i open the workbook and run any of my
functions trying to reference docPath, it is empty

is defining it as a const in ThisWorkbook not setting it public?
or do i need to do

public docPath

Private Sub Workbook_Open()
docPath = "C:\Temp\"
End Sub

?

doesn't that allow the path to be changed from other functions?

any suggestions greatly appreciated!

thanks!

J

 
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
hyperlink navigation path path wrong in Excel 2003 CE Admin Excel Discussion (Misc queries) 5 January 7th 06 07:47 PM
which declaration to use Peer Excel Programming 3 August 2nd 04 03:17 PM
Global variable declaration! aiyer[_12_] Excel Programming 3 April 13th 04 04:35 PM
Declaration? TJF[_2_] Excel Programming 5 December 18th 03 03:26 PM
How to set global constants and get path of spreadsh ? wellie Excel Programming 1 July 11th 03 03:06 AM


All times are GMT +1. The time now is 02:51 PM.

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"