LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default SpinButton Problem

Thanks Tom,
With your assistance I have taken another step in refining my spreadsheet
program.

Happy New Year!

Best regards,
Pete


"Tom Ogilvy" wrote in message
...
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
if target.count 1 then exit sub
With ActiveSheet
Select Case Target.Address
Case "$E$9"
.OLEObjects("SpinButton1").Enabled = True
.OLEObjects("SpinButton2").Enabled = False
Case "$E$12"
.OLEObjects("SpinButton1").Enabled = False
.OLEObjects("SpinButton2").Enabled = True
Case Else
.OLEObjects("SpinButton1").Enabled = False
.OLEObjects("SpinButton2").Enabled = False
End Select
End With
End Sub

--
Regards,
Tom Ogilvy


Pete Csiszar wrote in message
news:2mFIb.884694$6C4.234972@pd7tw1no...
Thanks for check Tom,

I actually did / do want the buttons disabled when click elsewhere.
When I used Greg's code with a sub that I already had in place, I got

the
desired action.
If you have a suggestion for incorporating that feature in to what Greg

has
done, I would be most appreciative.

Best regards,
Pete

"Tom Ogilvy" wrote in message
...
I thought you wanted them both disabled if any other cells was

selected.
Apparently not.

--
Regards,
Tom Ogilvy

"pcsis" wrote in message
news:7%rIb.49462$6b2.15674@edtnps84...
Thanks Greg this works like a charm!
Much more efficient all around than my clumsy attempt.

Happy New Year!

Pete

"Greg Wilson" wrote in message
...
PS:
The code should be placed in the Sheet(Sheet1) code
module, not the Thisworkbook code module.

Regards,
Greg











 
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
Substitute for OLE SpinButton? Daystrom Excel Discussion (Misc queries) 2 January 29th 09 09:10 PM
Spinbutton pcor New Users to Excel 2 November 6th 07 03:16 PM
Spinbutton Ben B Excel Discussion (Misc queries) 3 March 9th 06 11:38 AM
Spinbutton sorting civms47 Excel Programming 1 December 24th 03 01:10 PM
SpinButton Rounding Up Randal W. Hozeski Excel Programming 5 December 23rd 03 08:12 PM


All times are GMT +1. The time now is 03:57 PM.

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"