Forum Discussion
Al2kmontes
Nov 13, 2023Copper Contributor
Help debbuging - I have checked the path, files names, etc. any help is appreciated.
Private Sub Workbook_Activate() End Sub Private Sub Workbook_BeforeClose(Cancel As Boolean) Workbooks("DONT DELETE.xls").Close SaveChanges:=False Kill "G:\Training Unit\Cadet Training\Unit Folder...
Al2kmontes
Nov 13, 2023Copper Contributor
ActiveWorkbook.SaveAs "G:\Training Unit\Cadet Training\Unit Folder\Instructors\Class Material\Departments\Testing\DONT DELETE.xls"
HansVogelaar
Nov 13, 2023MVP
Try replacing the lines
Workbooks.Add
ActiveWorkbook.SaveAs "G:\Training Unit\Cadet Training\Unit Folder\Instructors\Class Material\Departments\Testing\DONT DELETE.xls"
Workbooks.Open Filename:="G:\Training Unit\Cadet Training\Unit Folder\Instructors\Class Material\Departments\Testing\DONT DELETE.xls"
with
Workbooks.Add.SaveAs FileName:="G:\Training Unit\Cadet Training\Unit Folder\Instructors\Class Material\Departments\Testing\DONT DELETE.xls", FileFormat:=xlExcel8
- Al2kmontesNov 13, 2023Copper ContributorI got past that error message but now it is throwing other ones.
-the file format and extension dont match.
- cound not find.......(Path could not be found)- HansVogelaarNov 13, 2023MVP
On the line that I suggested?
- Al2kmontesNov 13, 2023Copper ContributorRun-time error '1001';
Microsoft Excel cannot access the file'G/traiing Unit\........
-The file name or path does not exist
-The fie is being used by another program