Results 1 to 4 of 4

Thread: Solved: Copy Xrows from WrkBk to New WrkBk

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Regular mike31z's Avatar
    Joined
    Apr 2005
    Location
    Highland, Wisconsin
    Posts
    98
    Location

    Solved: Copy Xrows from WrkBk to New WrkBk

    I have this little code that I modified and can not get it to work.
    Source File Name= Event1.xls with one Tab named Event1 (This was created by importing a txt file in csv format.

    The destinagation file is E1Mgmt.xls exsisting tab "import" There are other tabs but I would like the data being copied on the existing "import" tab.

    I get the code to work but it creates new worksheet named "Import (1) and so on" I need it to overwrite the exisiting import worksheet.

    [VBA]Sub copyEvt()
    '
    ' copyEvt Macro
    ' Macro recorded 7/26/2011 by Mike
    '
    Windows("Event1.xls").Activate
    Sheets("Event1").Select
    Sheets("import").Copy Before:=Workbooks("E1Mgmt.xls").Sheets(1)
    Cells.Select
    Selection.Interior.ColorIndex = xlNone
    Rows("1:1").Select
    Selection.Insert Shift:=xlDown
    Range("B3").Select

    End Sub[/VBA]

    Thanks for looking

    Mike in Wisconsin
    Last edited by mike31z; 04-08-2012 at 01:40 PM.

Posting Permissions

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