Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Deleting rows in a range using Autofilter | Excel Discussion (Misc queries) | |||
Deleting rows after a specific Value | Excel Programming | |||
Deleting Specific Rows | Excel Discussion (Misc queries) | |||
Generalising Deleting Rows after AUTOFILTER | Excel Programming | |||
Deleting specific rows | Excel Programming |