Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
If a worksheet name is = to test then a msgbox appears
I'm looking for a macro that will display a msgbox if a worksheet is = to test.
For example, if the name of a sheet in a workbook is equal to test then display msgbox saying sheet already exists. Thanks Vick |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
If a worksheet name is = to test then a msgbox appears
dim ws as worksheet
set ws = nothing on error resume next set ws = worksheets("test") on error goto 0 if ws is nothing then msgbox "doesn't exist" else msgbox "already exists" end if Vick wrote: I'm looking for a macro that will display a msgbox if a worksheet is = to test. For example, if the name of a sheet in a workbook is equal to test then display msgbox saying sheet already exists. Thanks Vick -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Using VBA to create a new worksheet, and then target new worksheet | Excel Discussion (Misc queries) | |||
How to protect a worksheet from being copied to another worksheet | Excel Discussion (Misc queries) | |||
Copy from worksheet to another x times | Excel Discussion (Misc queries) | |||
Worksheet Function - Find? | Excel Worksheet Functions | |||
Worksheet name and Backward compatibility | Excel Discussion (Misc queries) |