Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
if statement for sheet not found in workbook
dear all,
i want to add new worksheet if the worksheet name is not found in the workbook when user input in the inputbox. tosheet is the variable input by user. ** this if statement is incorrect. how should i write the statement? If Worksheets(tosheet).Name not found in the workbook then ** this line is correct. Set ws = ThisWorkbook.Worksheets.Add(after:=ThisWorkbook.Sh eets(ThisWorkbook.Sheets.Count)) End If thanks alot |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Delete values in sheet 2 that arre found in sheet 1 | Excel Discussion (Misc queries) | |||
If ID # on one sheet isn't found on another... | Excel Worksheet Functions | |||
how can I format sheet 1 if the value is found in sheet 2? | New Users to Excel | |||
Do same thing to each workbook found in a folder | Excel Programming | |||
Jump to next sheet if not found | Excel Programming |