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: 1
Default TOGGLE BUTTON on userform problem


As one of many subroutines in my project, there is a simple even
handler which triggers off a messagebox at the end of a loop
Structurally, the code looks like:

Private Sub ToggleButton1_Click()
For each sh in WorkSheets
<do something
k = k & something & vbcrlf
Next
MsgBox k
End Sub

Now, for some strange reason, when the ToggleButton is clicked, th
MsgBox comes up *twice* each time. This is irritating, to say the leas
and in my attempts to stop the nuisance I have tried the event variant
* Private Sub ToggleButton1_Change* and * Private Su
ToggleButton1_Enter*-to no avail. While the Change event acts the sam
way as the Click event (and shares the double movement problem), the
Enter event fires the MsgBox only once as desired but does not permit
repeat successive runs of the code.


For what it is worth, let me also remark that, when the code i
transplanted to a fresh userform and tested in its new enviroment, th
above problem disappears: the MsgBox springs up once and no more.


If anyone has the disgnostic eye for this problem, I welcome hi
with thanks.

David

--
david
-----------------------------------------------------------------------
davidm's Profile: http://www.excelforum.com/member.php...fo&userid=2064
View this thread: http://www.excelforum.com/showthread.php?threadid=48764

 
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
Toggle Button mick2 Excel Discussion (Misc queries) 5 November 27th 05 05:52 AM
Toggle button keithl816 Excel Discussion (Misc queries) 2 November 21st 05 09:16 PM
Adding .xla button for Toggle Calculation Button Mike Excel Programming 5 August 19th 05 01:55 PM
Toggle Button Keri[_2_] Excel Programming 2 May 28th 04 04:58 PM
Toggle Button Ben E[_2_] Excel Programming 1 October 29th 03 04:42 PM


All times are GMT +1. The time now is 01:23 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"