Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello All,
I need some help in programming a macro. I need to check whether a specific worksheet is present in a workbook. If it is present, the macro follows one logic and if it does not it follows another logic. I tried referring to an cell value in that sheet, If ActiveWorkbook.Sheets("Alignment_Retail").Range("A 1").Value = "Select" Then But, while running the code, if the sheet "Alignment_Retail" is not present in the workbook, VBA immediately throws an "subscript out of range" error. Can some one please help me to draw out a different logic. All I need is to validate, whether the sheet is present in the workbook or not. I cannot use the worksheet count logic as the number of sheets can vary. Hoping to hear from you!!! Thanks in advance, Sagar |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Locating if a Sheet is present in a workbook | Excel Discussion (Misc queries) | |||
List all sheets present in Workbook | Excel Worksheet Functions | |||
Command for present sheet | Excel Programming | |||
Check if sheet exists in a closed workbook | Excel Programming | |||
How Do I Check To See Id A Character Is Present In A Cell | Excel Programming |