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: 9
Default Declaring Constants that can be used throughout the Workbook :)

Hiya Forumittes :)

I have put some standard code in "Workbook_open".
The code uses a "Const" (Constant) set-up in (General)(Declarations).

---- Code in General Declarations ----

Const Library_Name = "library.xla"

---- End Code ----

---- Code in Workbook_open ----

Application.Run(Library_Name & "!make_toast")

---- End Code ----


...So far so good...

But i put a button in Sheet 1, that needs to use the same "Const". But
"Sheet1" cant see the "Const" value set in "ThisWorkBook".

---- Code in Sheet 1 ----

Private Sub Testing_Button_Click()

MsgBox(Library_name)

End Sub

---- End Code ----

* so in summary, is there a way to set a value in "ThisWorkBook", used
in "Workbook_open" and through buttons on "Sheet1..2..3". Im hoping
along the lines of a Global/Public Constant.

....Dont ya just love the curly ones... ;)

eXcellence

 
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
declaring a certain value thephoenix12[_4_] Excel Programming 2 June 28th 05 02:31 PM
copy a set of names(constants) from 1 workbook to another Rahul Excel Discussion (Misc queries) 3 June 20th 05 10:02 AM
Declaring array constants at module level Microsoft Forum Excel Programming 2 January 24th 05 06:31 PM
declaring constants from the sheet? robert burger Excel Programming 4 August 25th 04 06:47 PM
Declaring a constant to the Workbook Name? NooK[_54_] Excel Programming 3 August 9th 04 07:23 AM


All times are GMT +1. The time now is 09:44 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"