LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default If Then to Add Row


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

--
bforster
-----------------------------------------------------------------------
bforster1's Profile: http://www.excelforum.com/member.php...fo&userid=1177
View this thread: http://www.excelforum.com/showthread.php?threadid=26435

 
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



All times are GMT +1. The time now is 12:02 AM.

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"