Data Monkey
New Member
- Joined
- May 27, 2016
- Messages
- 5
I've got some code that deletes a couple of tabs and then finished with a Save As box. Display Alerts is turned off for the second deleted tab (but I want it on for the first) but then turned back on before the Save As.
The Save As dialog box comes up and when I navigate to the desired file path (I don't want it specifying) I can see files in there but if I try to save over one of them it doesn't ask me if I want to like normal and it doesn't save.
Below is my code, please can someone let me know what I'm missing.
The Save As dialog box comes up and when I navigate to the desired file path (I don't want it specifying) I can see files in there but if I try to save over one of them it doesn't ask me if I want to like normal and it doesn't save.
Below is my code, please can someone let me know what I'm missing.
Code:
Sub Delete_Customer_Input()
Application.ScreenUpdating = False
Sheets("Customer Input").Delete
Application.DisplayAlerts = False
Sheets("Backup Data").Visible = True
Sheets("Backup Data").Delete
Application.DisplayAlerts = True
Application.ScreenUpdating = True
Sheets("Position Selection").Select
Range("A1").Select
Dim varResult As Variant
'displays the save file dialog
varResult = Application.GetSaveAsFilename( _
FileFilter:="Excel Macro-Enabled Workbook (*.xlsm), *.xlsm")
End Sub