Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code Stops Executing
I have code that copies and existing tab into a new spreadsheet then saves
the new spreadsheet. There is code after that that will close the newly formed spreadsheet and activate the previous spreadsheet. Problem is that after the code to save the new spreadsheet runs, the code just stops executing (doesnt continue to close the new file). Furthermore, the new spreadsheet doesnt get save €“ even though the file name at the top shows that it was saved. Any help would be appreciated. 'Make a copy of the letter Sheets("Letter 1").Copy Sheets("Letter 1").Name = GrpNumber 'Save the workbook €“ variables have been previously defined ActiveWorkbook.SaveAs FileName:= _ "G:\Filepath.xls", _ FileFormat:=xlExcel8, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False ActiveWindow.Close Windows("Previous File.xls").Activate Sheets("Letter 1").Select |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Code stops when high lighting (Chips code) | Excel Programming | |||
do anybody have a sample code for executing excel macro from vb code?<eom | Excel Programming | |||
(trying again...) code stops executing | Excel Programming | |||
VBA code stops executing | Excel Programming | |||
Stops executing or keep looping | Excel Programming |