Dazzawm
Well-known Member
- Joined
- Jan 24, 2011
- Messages
- 3,783
- Office Version
- 365
- Platform
- Windows
I have loads of files that have a before save code within them. I need to change the location, is it possible to change part of the code without opening them all individually?
This is the code
All I need to change is the 'Manager' in red to Manager1!
From another code I have it uses [FONT=Helvetica, Arial, Verdana, sans-serif]ADO connection and SQL that doesn't open the files is it possible here?[/FONT]
This is the code
Rich (BB code):
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If MsgBox("Save?", vbYesNo, "Confirm") = vbNo Then Exit Sub
Application.DisplayAlerts = False
ActiveSheet.Copy
ActiveWorkbook.SaveAs Filename:="C:\Documents and Settings\MANAGER\Desktop\Darrens Catalogues\Suspension_Catalog2.1A.csv", FileFormat:=xlCSV, CreateBackup:=False
ActiveWorkbook.Close False
End Sub
All I need to change is the 'Manager' in red to Manager1!
From another code I have it uses [FONT=Helvetica, Arial, Verdana, sans-serif]ADO connection and SQL that doesn't open the files is it possible here?[/FONT]