Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Global Variables

Hello,

Maybe I just don't get it but I seem to be having a bit of trouble with my
global variables. Proc. level variables are simple. Module level variables
are available to the module that they are declared in. Where and how do I
declare a global variable? I put:

Public gsFile As String in 'ThisWorkbook' module and in Auto_Open I put:

gsFile = Thisworkbook.Path & DB_FILE

The problem is that the variable looses its value once the sub routine
ends... How do I use the variable and retain its value while the workbook is
open?

Ernst.

Reply
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
Global vs Local variables Ken Loomis Excel Programming 1 October 12th 04 05:03 AM
Global variables cleared by forms? Stu[_33_] Excel Programming 4 February 29th 04 04:33 PM
Global Variables using User Forms Steve[_53_] Excel Programming 4 January 31st 04 02:38 AM
Global Variables Not Accessible John Baker Excel Programming 5 November 28th 03 01:23 AM
Declaring Global Variables skmr3 Excel Programming 1 July 14th 03 05:54 AM


All times are GMT +1. The time now is 01:28 AM.

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

About Us

"It's about Microsoft Excel"