Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleting rows in a range using Autofilter Connie Excel Discussion (Misc queries) 3 October 17th 06 01:47 PM
Deleting rows after a specific Value Steel Monkey[_6_] Excel Programming 2 June 2nd 06 01:48 AM
Deleting Specific Rows ScaffoldingDepot Excel Discussion (Misc queries) 2 May 4th 05 04:08 PM
Generalising Deleting Rows after AUTOFILTER jason Excel Programming 3 November 5th 04 02:17 PM
Deleting specific rows Matt[_20_] Excel Programming 3 November 13th 03 10:41 PM


All times are GMT +1. The time now is 03:20 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"