ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to check if a worksheet exists in worksheet collection (https://www.excelbanter.com/excel-programming/304393-how-check-if-worksheet-exists-worksheet-collection.html)

Raghunandan

How to check if a worksheet exists in worksheet collection
 
Hi All,
I wanted to know if there is any method to check if a worksheet exists in worksheets collection.I want to check this by worksheet name.

Thanks in advance

Regards
Raghu


Greg Wilson[_4_]

How to check if a worksheet exists in worksheet collection
 
See John Walkenbauch's function:

j-walk.com/ss/excel/tips/tip54.htm#func5


-----Original Message-----
Hi All,
I wanted to know if there is any method to check if a

worksheet exists in worksheets collection.I want to check
this by worksheet name.

Thanks in advance

Regards
Raghu

.


Frank Kabel

How to check if a worksheet exists in worksheet collection
 
Hi
one way

dim wks as worksheet
on error resume next
set wks = activeworkbook.worksheets("your_wks_name")
on error goto 0
if wks is nothing then
msgbox "worksheet does not exist"
end if


--
Regards
Frank Kabel
Frankfurt, Germany

"Raghunandan" schrieb im
Newsbeitrag ...
Hi All,
I wanted to know if there is any method to check if a worksheet

exists in worksheets collection.I want to check this by worksheet name.

Thanks in advance

Regards
Raghu




All times are GMT +1. The time now is 05:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com