View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
wmcray wmcray is offline
external usenet poster
 
Posts: 1
Default Help in Excel VBA Programing - How to check an Excel Worksheet?

I am very new to Excel VBA programming.

I want to write a sample command to check if there is an existing Exce
worksheet, say for example called "Report".

If there is an existing worksheet, then it should be deleted
Otherwise, a new worksheet called "Report" should be created.

Here is the program code. Can anyone please help me with the firs
line???

If ???? (there is a worksheet called "report") Then
Sheets("Report").Delete
Else
Sheets.Add
ActiveSheet.Name = "Report"
End If

Thanks!

--
Message posted from http://www.ExcelForum.com