Help With VBA

jo15765

Registered User.
Local time
Today, 04:21
Joined
Jun 24, 2011
Messages
130
I have so far written this code:
Code:
Workbooks.Open Filename:="C:\Testing\Test.xls"
With Sheets(Array("Sheet1", "Sheet2")).Select
Range("A1:EZ48").Select
ActiveWindow.SelectedSheets.Copy
ActiveWorkbook.SaveAs Filename:="C:\Testing_Spreadhseet" & ActiveWorksheet.Name & Format(Date, "mmddyyyy") & ".xls"
End With
End Sub
And it will move the two sheets to a new workbook, but I only want it to copy values and formats. What needs to be added to this code to only copy the values and formats? I have tried numerous things I saw on google, but nothing worked!
 
Hi

You would need to add a loop statement that copies each value from the first workbook & pastes to a cell in the other workbook.

If the formatting needs to be fixed, you can record a macro & use that in the final code to set the formatting you want.

Hth
 

Users who are viewing this thread

Back
Top Bottom