LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 470
Default Static Variable

I am using a userform. When "ENTER" commandbutton is clicked, it runs a
macro. In this macro I have a static variable, counter, that increments by
one each time through. When I added a command in the macro to call a
subroutine, the counter no longer maintains the correct value. When I use
msgbox to check the value, it is blank.

Up until the point prior to adding the call for the subroutine, the counter
worked fine.

What happened and what can I do to fix it?

Thanks,
Les
 
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
Static variable VBA beginner Excel Programming 4 September 16th 08 10:22 AM
Static variable RobcPettit[_2_] Excel Programming 1 January 28th 07 01:27 PM
Static variable cottage6 Excel Programming 0 June 24th 05 07:52 PM
Static Variable Todd Huttenstine Excel Programming 7 May 7th 04 11:16 AM


All times are GMT +1. The time now is 02:08 PM.

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

About Us

"It's about Microsoft Excel"