G
Guest
I'm running code that saves a workbook abd then it should build a string and
then save another workbook. The code stops after the first workbook is saved
and the code never completes. Any suggestions on how to correct when using
the following:
ActiveWorkbook.SaveAs Filename:=XLSFILE, _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
'return to the XLS file and close it
Windows(temp_xls_file).Activate
Workbooks(temp_xls_file).Close SaveChanges:=False
temp_file = "Hg Injection - " & the_sample_no & ".CSV"
CSVFILE = "V:\" + temp_file
'save a copy of the CSV file so that the XLS file will be imported
Windows("Hg Injection Exporter.xls").Activate
ActiveWorkbook.SaveAs Filename:=CSVFILE, FileFormat:= _
xlCSVMSDOS, CreateBackup:=False
then save another workbook. The code stops after the first workbook is saved
and the code never completes. Any suggestions on how to correct when using
the following:
ActiveWorkbook.SaveAs Filename:=XLSFILE, _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
'return to the XLS file and close it
Windows(temp_xls_file).Activate
Workbooks(temp_xls_file).Close SaveChanges:=False
temp_file = "Hg Injection - " & the_sample_no & ".CSV"
CSVFILE = "V:\" + temp_file
'save a copy of the CSV file so that the XLS file will be imported
Windows("Hg Injection Exporter.xls").Activate
ActiveWorkbook.SaveAs Filename:=CSVFILE, FileFormat:= _
xlCSVMSDOS, CreateBackup:=False