Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sin Button run macro Excel 2000 - 2003
Hello,
I put a worksheet toolbar Spinner Button on worksheet6 and my reference cell is on worksheet2. This code I put in worksheet6 module: Private Sub SpinButton1_SpinUp() Sheet2.Range("M4").Value = Sheet2.Range("M4").Value + 1 End Sub Private Sub SpinButton1_SpinDown() Sheet2.Range("M4").Value = Sheet2.Range("M4").Value - 1 End Sub Then, I assigned this macro to the spin button using a general module: Sub InDecreaseYear() If Sheet2.Range("M4") = 1 Then Call DateTesterBaselineIncrease Call BuildCalendar_North End If If Sheet2.Range("M4") = 2 Then Call DateTesterBaselineDecrease Call BuildCalendar_North End If End Sub This code will change the value in the cell from 1 to 2 and back to 1 but it will not run the macros to decrease the value it will only run the macros to increase the value. How can this code be changed when the spin button up is pressed those macros will run and when pressed down those macros will run? Thank you for your help, jfcby |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Office 2000 Excel Macro runs very slow in 2003, why? | Excel Discussion (Misc queries) | |||
Simple Macro, works in Excel 2002, 2003 but won't work in 2000 | Excel Programming | |||
Excel 2000 v 2003 Macro & VBA Incompatibities | Excel Programming | |||
Excel 2000 v 2003 Macro & VBA Incompatibility | Excel Programming | |||
Assign macro to button in EXCEL 2003 | Excel Programming |