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
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
Daniel,
Dimming a variable outside the procs makes it module-level. If you'll need
to use it across modules, make it project level:
Public sheetcnt As Integer
--
Earl Kiosterud
www.smokeylake.com/
-------------------------------------------
"Daniel" <softwareengineer98037@yahoo.com> wrote in message
news:%23ya7IdBhFHA.2916@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
>
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks