Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Stuart,
The worksheet copy method doesn't return a reference to the copied worksheet (although it really should, and I don't understand why it was designed that way). The worksheet you copy will become the ActiveSheet as soon as the copy is complete, so you have to set your reference to the ActiveSheet immediately after the copy operation. -- Rob Bovey, MCSE, MCSD, Excel MVP Application Professionals http://www.appspro.com/ * Please post all replies to this newsgroup * * I delete all unsolicited e-mail responses * "Stuart" wrote in message ... In the following I receive an 'Object required' error on the line 'Set ws2 etc'. Why is this, please? For Each ws In Workbooks(SourceWorkbook).Worksheets With ws If Not (UCase(.Name) = "MASTER") Then With wb Set ws2 = wb.Worksheets("MASTER").Copy(After:= _ wb.Sheets(wb.Sheets.Count)) ws2.Name = ws.Name etc The copy is made when stepping through, but only after the error message is displayed. Regards. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.500 / Virus Database: 298 - Release Date: 10/07/2003 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Object required??? What object? | Excel Discussion (Misc queries) | |||
R/T 424 - Object required Help | Excel Discussion (Misc queries) | |||
Runtime error '424': Object Required | Excel Discussion (Misc queries) | |||
"Microsoft Visual Basic runtime error '424' object required". | Excel Worksheet Functions | |||
Object Required | Excel Discussion (Misc queries) |