View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_4_] Bob Phillips[_4_] is offline
external usenet poster
 
Posts: 834
Default reset the value of a spin button

Basically, I am adding my own version of enableevents by using a boolean
variable to determine whether the code executes or not.

--

HTH

Bob

"cubbybear3" wrote in message
...
On Apr 7, 2:58 pm, "Bob Phillips" wrote:
Option Explicit

Private fNoChange As Boolean

'other code

Private Sub spnButton1_Change()
If Not fNoChange Then

'change code
End If
End Sub

'more code

fNoChange = True
spnButton1.Value = VarX
fNoChange = False

--

HTH

Bob

"cubbybear3" wrote in message

...

Q: How can I reset the value of a spin button with out setting off the
CHANGE event?
I am using Office Pro 2003 and have tried the following with out
success:


Application.EnableEvents = False
spnButton1.Value = VarX
Application.EnableEvents = True


Well, I still haven't figured out EXACTLY how it works, but it
does.
Mucho gracias Bob.