Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
merge cells button doesn't work | Excel Worksheet Functions | |||
enter data on 1 sheet and make it enter on next avail row on 2nd s | Excel Discussion (Misc queries) | |||
Set Increment on Spin Button to 0.1 | Excel Discussion (Misc queries) | |||
How to make Unique coloumn in Excel sheet ? | Excel Discussion (Misc queries) | |||
problem to work out with excel sheet | Excel Worksheet Functions |