![]() |
Deleting specific rows after an autofilter
I have the following line in a macro
rows("32:32") I would like to have it so that we can vary, to, say rows("38:38"). The value in rownumber variable i want to pass to this line rows("rownumber:rownumber"). Can someone help me with that ? Sub test() Dim rownumber As Integer Dim flag As Integer Dim answer As Integer 'rownumber = InputBox("Enter a rownumber: ") 'MsgBox "The rownumber entered is : " & rownumber 'Answer = MsgBox("Do you want to continue ? ", vbYesNo) answer = 7 ' flag = 1 Do While answer = 7 rownumber = InputBox("Enter a rownumber: ") MsgBox "The rownumber entered is : " & rownumber answer = MsgBox("Is the row number correct ?", vbYesNo) ' If answer = 6 Then flag = 0 Loop MsgBox "the rownumber used is : " & rownumber End Sub |
Deleting specific rows after an autofilter
Rows(Rownumber)
may work for you. forbrowsing wrote: I have the following line in a macro rows("32:32") I would like to have it so that we can vary, to, say rows("38:38"). The value in rownumber variable i want to pass to this line rows("rownumber:rownumber"). Can someone help me with that ? Sub test() Dim rownumber As Integer Dim flag As Integer Dim answer As Integer 'rownumber = InputBox("Enter a rownumber: ") 'MsgBox "The rownumber entered is : " & rownumber 'Answer = MsgBox("Do you want to continue ? ", vbYesNo) answer = 7 ' flag = 1 Do While answer = 7 rownumber = InputBox("Enter a rownumber: ") MsgBox "The rownumber entered is : " & rownumber answer = MsgBox("Is the row number correct ?", vbYesNo) ' If answer = 6 Then flag = 0 Loop MsgBox "the rownumber used is : " & rownumber End Sub -- Dave Peterson |
All times are GMT +1. The time now is 11:50 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com