+ Reply to Thread
Results 1 to 2 of 2

in VBA Sheets("mysheet").Copy Before:=Sheets(1) how do i get a reference to the newly created copy of this sheet?

  1. #1
    Daniel
    Guest

    in VBA Sheets("mysheet").Copy Before:=Sheets(1) how do i get a reference to the newly created copy of this sheet?

    in VBA Sheets("mysheet").Copy Before:=Sheets(1) how do i get a reference to
    the newly created copy of this sheet?



  2. #2
    Norman Jones
    Guest

    Re: in VBA Sheets("mysheet").Copy Before:=Sheets(1) how do i get a reference to the newly created copy of this sheet?

    Hi Daniel,

    Try something like:

    Dim WB As Workbook
    Dim WS As Worksheet

    Set WB = ActiveWorkbook
    With WB
    .Sheets("Mysheet").Copy Before:=.Sheets(1)
    End With

    Set WS = ActiveSheet


    ---
    Regards,
    Norman



    "Daniel" <[email protected]> wrote in message
    news:[email protected]...
    > in VBA Sheets("mysheet").Copy Before:=Sheets(1) how do i get a reference
    > to
    > the newly created copy of this sheet?
    >
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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