Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Daniel
 
Posts: n/a
Default in VBA Sheets("mysheet").Copy Befo=Sheets(1) how do i get a reference to the newly created copy of this sheet?

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


  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

dim newWks as worksheet

with activeworkbook
.sheets("mysheet).copy _
befo=.sheets(1)
end with
set newwks = activesheet
newwks.name = "this is a new sheet!"

(the activesheet is the one that just got created.)

Daniel wrote:

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


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:46 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"