B
bforster1
I have written the following code to add a row based on the numbe
selected by the user via a spinbutton.
Sub AddRow()
If Sheets("Sheet1").Range("B3").Value = "2" Then Rows("4:10").Selec
Selection.EntireRow.Hidden = True
If Sheets("Sheet1").Range("B3").Value = "1" Then Rows("4:10").Selec
Selection.EntireRow.Hidden = False
End Sub
The function does not work and I would appreciate any assistance.
would also like the code to fire each time the spinbutton is changed.
Thank
selected by the user via a spinbutton.
Sub AddRow()
If Sheets("Sheet1").Range("B3").Value = "2" Then Rows("4:10").Selec
Selection.EntireRow.Hidden = True
If Sheets("Sheet1").Range("B3").Value = "1" Then Rows("4:10").Selec
Selection.EntireRow.Hidden = False
End Sub
The function does not work and I would appreciate any assistance.
would also like the code to fire each time the spinbutton is changed.
Thank