Thanks Thanks:  0
Likes Likes:  0
Results 1 to 6 of 6

Thread: INSERT ROW

  1. #1
    Guest

    Default

    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.

  2. #2
    Guest

    Default

    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

  3. #3
    MrExcel MVP Russell Hauf's Avatar
    Join Date
    Feb 2002
    Location
    Portland, OR Area - USA
    Posts
    1,607
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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.

    -rh

  4. #4
    Guest

    Default

    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

  5. #5
    MrExcel MVP Barrie Davidson's Avatar
    Join Date
    Feb 2002
    Location
    Winnipeg
    Posts
    2,330
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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.

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


    Barrie Davidson

    "You're only given a little spark of madness. You mustn't lose it." - Robin Williams

  6. #6
    Guest

    Default

    [/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)




Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •