PC Review


Reply
Thread Tools Rate Thread

Copying sheets to new workbook, merged cell issue?

 
 
Simon
Guest
Posts: n/a
 
      6th Aug 2008
‘Alpha is a tab in another workbook (WBSEL) which is copied and pasted
in to a newly added workbook (via VBA). However this is an 1004 error
relating to a merged cell (A1:J1).

For some reason it won’t copy due to the merged cell? Why is this,
the whole sheet is copied, why is it dependent on a cell?

With WBAlpha
.SaveAs Filename:="N:\mis\" & MyRange.Value & MyRange2.Value &
"\" & "Alpha Figures" & " " & MyRange.Value & MyRange2.Value & ".xls"
End With

WBSEL.Activate
Sheets("Alpha").Select
Sheets("Alpha").Copy Before:=WBAlpha.Sheets(1)
WBAlpha.Activate
Sheets("Alpha").Paste
Sheets("Sheet1").Select
ActiveWindow.SelectedSheets.Delete
Sheets("Sheet2").Select
ActiveWindow.SelectedSheets.Delete
Sheets("Sheet3").Select
ActiveWindow.SelectedSheets.Delete

With WBAlpha
.SendMail Recipients:=Array(RngEmailTest2.Value, RngEmailTest.Value)
.Close SaveChanges:=True


Thanks, Simon (the MyRange.Value occurances are merely a date
stamping for the previous month.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying data from workbook/sheets to another workbook/sheet =?Utf-8?B?eXVrb25fcGhpbA==?= Microsoft Excel Programming 0 26th Jul 2006 07:33 PM
Copying sheets to a new workbook kev_06 Microsoft Excel Programming 2 2nd Jun 2006 10:32 PM
How do I pull a merged cell from another workbook? foxspirit Microsoft Excel Worksheet Functions 0 7th Feb 2006 04:47 PM
Re: Copying Sheets to New Workbook Tom Ogilvy Microsoft Excel Programming 0 2nd Apr 2005 05:57 PM
Issue Copying Merged Cell Text =?Utf-8?B?Y2luY29kZTU=?= Microsoft Excel Misc 1 18th May 2004 04:50 PM


Features
 

Advertising
 

Newsgroups
 


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