View Single Post
  #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