Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Set sem__ = Sheets("template").Copy(befo=Sheets(1))

can someone help me on this one .. i cant figured it why i get error
424



Set sem__ = Sheets("template").Copy(befo=Sheets(1))


ty

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Set sem__ = Sheets("template").Copy(befo=Sheets(1))

This works...
Dim sem__ As Excel.Worksheet
Sheets("template").Copy befo=Sheets(1)
Set sem__ = ActiveSheet

Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



wrote in message
can someone help me on this one .. i cant figured it why i get error 424

Set sem__ = Sheets("template").Copy(befo=Sheets(1))

ty

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Set sem__ = Sheets("template").Copy(befo=Sheets(1))

If you look at the Copy method of the Sheets collection in the Object
browser, you'll see that it is defined as "Sub Copy([Before], [After])".
As a Sub it has no return value and consequently you have nothing to Set
"sem__" equal to.
If it was a function (e.g. WorkSheets.Add; "Function Add([Before], [After],
[Count], [Type]) As Object") then you could as it return a value, an Object
in this case.

NickHK

wrote in message
oups.com...
can someone help me on this one .. i cant figured it why i get error
424



Set sem__ = Sheets("template").Copy(befo=Sheets(1))


ty



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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sheets("Rpt").Copy different results from running in macro than off excel menu?? tmbo Excel Discussion (Misc queries) 7 August 9th 06 01:13 PM
Auto "copy and paste" individual cells from various sheets into one sheet ?? [email protected] Excel Discussion (Misc queries) 2 March 1st 06 03:19 AM
"With Sheets" Issue - macro on one sheet to affect hidden rows on other sheets Punsterr Excel Programming 3 February 21st 06 04:01 AM
Sheets.Add using other worksheet as "template" [email protected] Excel Programming 3 April 26th 05 01:22 AM
"Path/File Access Error" on Sheets.Copy Nick Cranham Excel Programming 4 April 15th 04 01:41 PM


All times are GMT +1. The time now is 04:10 PM.

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"