Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 834
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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.


Reply
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
Spin button aqualibra Excel Programming 4 December 11th 09 09:40 PM
Please help - Spin Button the nomad Excel Programming 7 June 13th 08 11:24 AM
Reset Spin Button stewdizzle Excel Programming 2 January 2nd 07 06:06 PM
spin button bruce forster Excel Programming 1 May 7th 04 12:21 AM
Spin Button Andrew[_14_] Excel Programming 1 July 18th 03 01:51 AM


All times are GMT +1. The time now is 10:25 AM.

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

About Us

"It's about Microsoft Excel"