Hi,
I have a routine in Access VBA that opens an Excel spreadsheet and creates a pivot table on a sheet named 'Pivot' and then gives the user the control in Excel. The user can then save the spreadsheet.
However, I'm getting a problem that if the user tries to run the routine again, an error is raised since the sheet 'Pivot' already exists...is there a way to check if a particular sheet name exists, and if it does, delete it ?
Feedback appreciated...thanks!
I have a routine in Access VBA that opens an Excel spreadsheet and creates a pivot table on a sheet named 'Pivot' and then gives the user the control in Excel. The user can then save the spreadsheet.
However, I'm getting a problem that if the user tries to run the routine again, an error is raised since the sheet 'Pivot' already exists...is there a way to check if a particular sheet name exists, and if it does, delete it ?
Feedback appreciated...thanks!