From: cubbybear3 on
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

From: Bob Phillips on
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" <n4213l(a)gmail.com> wrote in message
news:065edf94-f49d-4a0d-8da8-30cf601d883b(a)u34g2000yqu.googlegroups.com...
> 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
>


From: cubbybear3 on
On Apr 7, 2:58 pm, "Bob Phillips" <bob.phill...(a)somewhere.com> 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" <n42...(a)gmail.com> wrote in message
>
> news:065edf94-f49d-4a0d-8da8-30cf601d883b(a)u34g2000yqu.googlegroups.com...
>
> > 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.
From: Bob Phillips on
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" <n4213l(a)gmail.com> wrote in message
news:78596165-4545-43e0-837b-2fc05420e678(a)z6g2000yqz.googlegroups.com...
On Apr 7, 2:58 pm, "Bob Phillips" <bob.phill...(a)somewhere.com> 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" <n42...(a)gmail.com> wrote in message
>
> news:065edf94-f49d-4a0d-8da8-30cf601d883b(a)u34g2000yqu.googlegroups.com...
>
> > 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.