View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 380
Default sheet name used ?

On Error Resume Next
Set sh = Worksheets("sheetname")
On Error Goto 0
If sh Is Nothing Then
'do your stuff
End If

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Corey" wrote in message
...
I have a code to create a copy of a sheet, and re-name it.
I have put a :
if res="" then
exit sub

but if res= 'An existing sheet name already' How do i write this?

if res=sheets.name ?

???


Regards

Corey