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" <softwareengineer98037@yahoo.com> wrote in message news:e5qcPdBhFHA.3868@TK2MSFTNGP14.phx.gbl...
> 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
>
>
Bookmarks