Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a macro that takes data from an existing tab,
creates a new tab called "Final", and does some formatting stuff with it. An improvement I want to make is to have the macro check the workbook at the beginning to see if it already has an existing "Final" tab, and if so, prompt the user whether to delete the existing tab or quit the macro. How do I make this work? Thank you |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim oSheet As Worksheet
On Error Resume Next Set oSheet = Worksheets("Sheet1") On Error GoTo 0 If oSheet Is Nothing Then Worksheets.Add.Name = "Sheet1" End If -- HTH ------- Bob Phillips "Macro Help" wrote in message ... I have a macro that takes data from an existing tab, creates a new tab called "Final", and does some formatting stuff with it. An improvement I want to make is to have the macro check the workbook at the beginning to see if it already has an existing "Final" tab, and if so, prompt the user whether to delete the existing tab or quit the macro. How do I make this work? Thank you |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
How do I sort tabs on an existing spreadsheet? | Excel Worksheet Functions | |||
Rename all existing worksheet tabs | Excel Discussion (Misc queries) | |||
add a check box on Excel tabs | Setting up and Configuration of Excel | |||
Check boxes to show/hide Tabs | Excel Worksheet Functions |