Billy_Elliott
New Member
- Joined
- Jun 2, 2015
- Messages
- 1
Hi all,Fist off I love the support here and usually can find all the answers to my excel questions. However, this has me stumped. I am trying to create a copy of seveal sheets that are created, named and save them to different location. For some reason only the first sheet pastes with only values and the others are linked to the orginal work book. Here is a snipet of the code:
Dim wbName As String
Dim permit1 As String
Dim permit2 As String
permit1 = Sheet7.Cells(17, 14).Value
permit2 = Sheet7.Cells(18, 14).Value
If Sheet7.Cells(17, 15) = 2 Then
Sheets(Array("CALL", "FIELD", permit1, permit2)).Select
Sheets(Array("CALL", "FIELD", permit1, permit2)).Copy
Cells.Copy
Range("A1").PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
wbName = directory.Value & "\" & ThisWorkbook.Worksheets("working").Range("E35")
ActiveWorkbook.SaveAs wbName
ActiveWorkbook.CloseEnd If
Any ideas?
Thanks
Dim wbName As String
Dim permit1 As String
Dim permit2 As String
permit1 = Sheet7.Cells(17, 14).Value
permit2 = Sheet7.Cells(18, 14).Value
If Sheet7.Cells(17, 15) = 2 Then
Sheets(Array("CALL", "FIELD", permit1, permit2)).Select
Sheets(Array("CALL", "FIELD", permit1, permit2)).Copy
Cells.Copy
Range("A1").PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
wbName = directory.Value & "\" & ThisWorkbook.Worksheets("working").Range("E35")
ActiveWorkbook.SaveAs wbName
ActiveWorkbook.CloseEnd If
Any ideas?
Thanks
Last edited: