INSERT ROW

G

Guest

Guest
Via an "Input Box" is asked : "after which
row,you will insert a row?"
When choosen for example 25,then the macro will automaticly select row 26 as an empty row.
Have somebody such a macro?
Thanks.
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
On 2002-03-12 10:25, Anonymous wrote:
Via an "Input Box" is asked : "after which
row,you will insert a row?"
When choosen for example 25,then the macro will automaticly select row 26 as an empty row.
Have somebody such a macro?
Thanks.

You could try something like this:
Code:
Sub InsertRow()

On Error Resume Next

    Dim RowNum As Long

    RowNum = Application.InputBox(Prompt:="Enter Row Number", Type:=1)
    
    Rows(RowNum).EntireRow.Insert
    
End Sub

Hope this helps,

Russell
 
Upvote 0
Foiled again! The last post was from me.

Why do I do this (posting this message saying that the last post was from me), you may ask? Because I like to search on my name to see the replies to my posts. :biggrin:

-rh
 
Upvote 0
On 2002-03-12 13:58, Anonymous wrote:
On 2002-03-12 10:25, Anonymous wrote:
Via an "Input Box" is asked : "after which
row,you will insert a row?"
When choosen for example 25,then the macro will automaticly select row 26 as an empty row.
Have somebody such a macro?
Thanks.

You could try something like this:
Code:
Sub InsertRow()

On Error Resume Next

    Dim RowNum As Long

    RowNum = Application.InputBox(Prompt:="Enter Row Number", Type:=1)
    
    Rows(RowNum).EntireRow.Insert
    
End Sub

Hope this helps,

Russell
Thanks for answer,but the macro does not insert an entire row.Can you complete your macro please?
Thanks.
Can you complete your
 
Upvote 0
On 2002-03-12 14:04, Russell Hauf wrote:
Foiled again! The last post was from me.

Why do I do this (posting this message saying that the last post was from me), you may ask? Because I like to search on my name to see the replies to my posts. :biggrin:

-rh

I don't know Russell....it appears this new board is out to get you!

:)
 
Upvote 0
[/quote]
Thanks for answer,but the macro does not insert an entire row.Can you complete your macro please?
Thanks.
[/quote]


It works when I run it.

(I am not Russell Hauf)
 
Upvote 0

Forum statistics

Threads
1,215,049
Messages
6,122,864
Members
449,097
Latest member
dbomb1414

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top