Hi,
I am trying to automate the creation of a worksheet. I want to check if a file exists, if yes, delete the file, if no, create the file.
This is the code I currently have:
I am trying to automate the creation of a worksheet. I want to check if a file exists, if yes, delete the file, if no, create the file.
This is the code I currently have:
Code:
Dim sheet As Worksheet
Application.DisplayAlerts = False
Sheets("Test").Delete
Application.DisplayAlerts = True
Set sheet = Sheets.add
sheet.Name = "Test"