Hi all,
I'm trying to save a renamed copy of the workbook, open the new workbook, delete the contents of some columns in the new workbook and other operations, then save and close the new workbook.
I have this code so far. It successfully saves a renamed workbook and opens it, but then I get a "not responding" and I have to shut down excel.
Sub Copy_Workbook()
Dim file_ext, name_id As String
Stop
With ThisWorkbook
file_ext = Right(ActiveWorkbook.name, 5)
name_id = Str(Val(Mid(ActiveWorkbook.name, 7, 5) + 1))
.SaveCopyAs "c:\Dink\Test\" & "Master" & name_id & file_ext 'ActiveWorkbook.name"
End With
Workbooks.Open "c:\Dink\Test\" & "Master" & name_id & file_ext
Debug.Print ActiveWorkbook.name
End Sub
as always any help appreciated.
Bookmarks