Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
 
Posts: n/a
Default Spin button in a work sheet - how do I make it work?

I can enter the spin button into a worksheet. However, I cannot get it to
change the target cell for changing values up or down. Do I need to write a
macro to do this for the spin button? If someone could walk me through one
of the ACTIVEX controls, I believe I could handle the remaining ones.

Thanks

Mike Moore
  #2   Report Post  
John Mansfield
 
Posts: n/a
Default

Mike,

Assuming you are working with ACTIVEX controls and not the Forms controls .
.. .

To add a spinbutton to your worksheet:

View - Toolbars - Control Toolbor
Cick on the Controls Toolbox Design icon is activated, or in "Design Mode"
Drag the spin button from the Control Toolbar onto your worksheet
Click on the spin button once
Right-click on your mouse and select "Properties"
The most important fields are probably the spin button name, linked cell,
max, and min.
Set the linked cell, max, and min
When complete, deactivate the design mode on the Controls Toolbar

Assuming the sheet where the spinbutton resides is called "sheet1", you can
further control the spin button via VBA. This example shows spinup and
spindown procedures for a spin button named "Spinbutton1". The procedures
set the minimum and maximum values for the value in cell A1:

Private Sub SpinButton1_SpinDown()
With Range("A1")
.Value = WorksheetFunction.Max(-0.2, .Value - 0.001)
End With

End Sub
Private Sub SpinButton1_SpinUp()
With Range("A1")
.Value = WorksheetFunction.Min(0.2, .Value + 0.001)
End With
End Sub

Hope this helps.

----
Regards,
John Mansfield
http://www.pdbook.com

" wrote:

I can enter the spin button into a worksheet. However, I cannot get it to
change the target cell for changing values up or down. Do I need to write a
macro to do this for the spin button? If someone could walk me through one
of the ACTIVEX controls, I believe I could handle the remaining ones.

Thanks

Mike Moore

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
merge cells button doesn't work Mark F Excel Worksheet Functions 5 April 3rd 23 07:30 PM
enter data on 1 sheet and make it enter on next avail row on 2nd s Nadia Excel Discussion (Misc queries) 27 September 9th 05 03:39 PM
Set Increment on Spin Button to 0.1 Mark Excel Discussion (Misc queries) 1 March 14th 05 11:22 AM
How to make Unique coloumn in Excel sheet ? V JHANJI Excel Discussion (Misc queries) 2 March 9th 05 10:04 AM
problem to work out with excel sheet raj Excel Worksheet Functions 1 December 27th 04 08:07 AM


All times are GMT +1. The time now is 02: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"