If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Global or Workbook level variables.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-20-05, 04:15
daveo61 daveo61 is offline
Registered User
 
Join Date: Feb 2005
Location: England.
Posts: 232
Global or Workbook level variables.

Guys, I need to create a workbook, not worksheet level VBA variable. Basically something that spans the whole of the workbook and that can be accessed by each and every worksheet.

Any ideas on where I can specify this and how?

TIA.
Reply With Quote
  #2 (permalink)  
Old 10-20-05, 16:23
vextout vextout is offline
Registered User
 
Join Date: Jan 2003
Location: New York
Posts: 160
in a module
__________________
Beyond Limitation
Reply With Quote
  #3 (permalink)  
Old 10-20-05, 17:12
shades shades is offline
Registered User
 
Join Date: Oct 2003
Posts: 1,091
In a standard module. While in Excel hit ALT + F11, which opens the VBE. On the left is the Project Explorer window. Click on the name of the work FOLDER, and then go to INSERT > Module. A window will appear on the right, and you can post the code there.
__________________
old, slow, and confused
but at least I'm inconsistent!

Rich
(retired Excel 2003 user, 3/28/2008)

How to ask a question on forums
Reply With Quote
  #4 (permalink)  
Old 10-21-05, 06:09
DavidCoutts DavidCoutts is offline
Registered User
 
Join Date: Jan 2004
Location: Aberdeen, Scotland
Posts: 1,067
Quote:
Originally Posted by shades
In a standard module. While in Excel hit ALT + F11, which opens the VBE. On the left is the Project Explorer window. Click on the name of the work FOLDER, and then go to INSERT > Module. A window will appear on the right, and you can post the code there.
and remember to make it public such as

Public sVar as String for example
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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