Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default SpinButton1.Max quick question

I'm just learning VBA so try and bear with me a little but here's my
question.
I've got 1 cell (9,2) that has an arbitrary number and I've got 4 spin
buttons that subtract from that number so if I raise the value 1 in all
4 spin boxes the value in cell 9,2 will subtract 4. I was trying to
figure out how to stop all the spin buttons from working once cell 9,2
reaches 0 but activating them if the number is changed above zero. This
is what I've got so far it work but then if the number in 9,2 increases
the button doesn't work
Cell 4,2 is the cell that is linked to SpinButton1

Private Sub SpinButton1_Change()
If Cells(9, 2).Value <= 0 Then SpinButton1.Max = Cells(4, 2).Value Else
SpinButton1.Max = 530
End Sub

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
Quick question on Add-in Shuvro Basu Excel Programming 1 May 8th 06 03:58 PM
Quick little question ben simpson Excel Discussion (Misc queries) 3 April 11th 06 02:35 PM
Quick question - quick answer about assigning shortcut keys funkymonkUK[_75_] Excel Programming 1 October 13th 05 10:50 AM
Qn: SpinButton1.Max not working?? Michael Vaughan Excel Programming 3 August 29th 04 12:10 AM
Quick Question Jayhawktc[_2_] Excel Programming 1 April 14th 04 02:09 PM


All times are GMT +1. The time now is 02:07 AM.

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"