Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
reset the value of a spin button
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
reset the value of a spin button
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
reset the value of a spin button
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. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Spin button | Excel Programming | |||
Please help - Spin Button | Excel Programming | |||
Reset Spin Button | Excel Programming | |||
spin button | Excel Programming | |||
Spin Button | Excel Programming |