Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 89
Default Copying sheets to new workbook, merged cell issue?

‘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 Befo=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
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
Color formatting issue when copying excel sheet from workbook to o Sanjeev Excel Discussion (Misc queries) 1 July 23rd 08 08:44 PM
Copying data from workbook/sheets to another workbook/sheet yukon_phil Excel Programming 0 July 26th 06 07:33 PM
Issue with Hiding Sheets Depending on Workbook Name Kris Excel Programming 3 May 12th 06 03:30 PM
Issue Copying Data from one workbook to another Mike G - D.C. Excel Programming 3 November 19th 05 05:54 PM
Autofit Column Headers with wrapped text (Not a merged cell issue) Mark Excel Programming 0 September 13th 05 12:42 AM


All times are GMT +1. The time now is 08:40 PM.

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"