Results 1 to 3 of 3

Copy/insert a row to a position defined in a form

Threaded View

bob_x28 Copy/insert a row to a... 08-12-2009, 07:38 AM
Palmetto Re: Copy/insert a row to a... 08-12-2009, 08:20 AM
bob_x28 Re: Copy/insert a row to a... 08-12-2009, 08:34 AM
  1. #1
    Registered User
    Join Date
    08-11-2009
    Location
    Zurich, Switzerland
    MS-Off Ver
    Excel 2003
    Posts
    2

    Red face Copy/insert a row to a position defined in a form

    Hi, I'm not an experienced VBA programmer, so hopefully (and probably) for you it's easy to tell me how to do it:

    So far, I copy a row(1) to another position (7) with this macro:

    Rows("1:1").Select
    Selection.Copy
    Range("A7:BU7").Select
    Selection.Insert Shift:=xlDown
    Range("A7:BU7").Select
    Application.CutCopyMode = False
    Range("A7").Select

    That works well so far.
    Now what I want to do is, to use a form and enter a number and have the row 1 inserted in this row number (because it should not always be in row 7). For example that i can insert 38 in the form and it will copy the row number 1 to row number 38.

    I tried this
    Range("frm_insertrow.txt_rownumber").Select

    Which you're probably laughing at now

    I hope somebody can help me, thanks!
    Last edited by bob_x28; 08-12-2009 at 08:35 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1