Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try something like
Dim Sht As Worksheet On Error Resume Next Set Sht = ActiveWorkbook.Worksheets("Time") On Error Goto 0 If Sht Is Nothing Then Sheets.Add.Name = "Time" End If -- Regards Juan Pablo González "scrabtree" wrote in message ... I want to run a certain VBA code if a sheet in a workbook is present and not if it isn't. If there is a sheet named "Time" I want it to do nothing. If there is no sheet named "Time" I want it to add a sheet and name it "Time". |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
If statement linking data from one sheet to another | Excel Worksheet Functions | |||
If statement linking data from one sheet to another | Excel Worksheet Functions | |||
copy cells from multiple pages to one sheet w/ if statement | Excel Worksheet Functions | |||
How to use cell fron different sheet in IF statement | Excel Discussion (Misc queries) | |||
dates and if statement work on one sheet, not on another | Excel Worksheet Functions |