Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Daniel
 
Posts: n/a
Default why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel?

why is it saying sheetcnt is "variable not defined" how to do a global
variable to share over multiple functions in vba for excel?

Dim sheetcnt As Integer
Private Sub cmdImport_Click()
sheetcnt = 1


  #2   Report Post  
David McRitchie
 
Posts: n/a
Default

Hi Daniel,

XL: Scope of Variables in Visual Basic for Applications
http://support.microsoft.com/default...;en-us;Q141693

---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Daniel" wrote in message ...
why is it saying sheetcnt is "variable not defined" how to do a global
variable to share over multiple functions in vba for excel?

Dim sheetcnt As Integer
Private Sub cmdImport_Click()
sheetcnt = 1




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
I can define a name, but I cannot use the name - menu Insert-Name-Use is blank Zdenek Moravec Excel Discussion (Misc queries) 4 April 15th 05 02:55 PM
How can I assign a range starting cell based on a variable locati. feman007 Excel Worksheet Functions 3 March 9th 05 11:40 PM
make a vlookup using a variable path Alex St-Pierre Excel Worksheet Functions 1 March 2nd 05 11:54 PM
I Need VBA Assistance for global variable question Brent E Excel Discussion (Misc queries) 1 March 1st 05 08:46 PM
change function variable prompts?? thinkingfield Excel Worksheet Functions 1 November 8th 04 04:01 PM


All times are GMT +1. The time now is 10:22 PM.

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"