LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Add new worksheet and assign it to an object variable?

I want to copy a worksheet and place it after an existing worksheet, then
assign the new worksheet to an object variable but can't get my head around
the code today. Here is what I have so far:

Set NewWS =
Worksheets(BackupWS).Copy(After:=Sheets("Summary") )
NewWS.Name = ws.Name

The above is obviously flawed as it doesn't work for me.

XL2002 SP2
Win2K Pro


--
|
+--Thief_
|



 
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I assign a macro to a graphic object on the worksheet bigjim Excel Discussion (Misc queries) 1 March 24th 08 03:08 AM
Object Variable Not Set Error on Selection object Jean Excel Worksheet Functions 3 July 24th 06 06:45 PM
FileSearch Object - Cannot assign to variable Alan Excel Programming 1 January 24th 05 03:41 AM
Run-time error '91': "Object variable or With block variable not set Mike[_92_] Excel Programming 2 December 30th 04 10:59 AM
Cells.Find error Object variable or With block variable not set Peter[_21_] Excel Programming 2 May 8th 04 02:15 PM


All times are GMT +1. The time now is 12:34 AM.

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

About Us

"It's about Microsoft Excel"