Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Markus,
Yes, I use this same routine in my workbook when I know the sheetname. The issue here is that I'm importing a list of formulas that I've exported from another workbook. I don't know how to do a routine to go through any formula and identify and isolate any possible worksheet names so that I can test them with this procedure. (I expect some highly complex series of string searches would do so, but I think it would take me forever... maybe a routine exists?) So instead, I use a different routine I've found on this newsgroup, that pastes the formula in a cell, tests if it gives a #REF error. If so, it assumes the worksheet doesn't exist. If it doesn't then it clearly does. Thanks for your assistance, Chuck Waterfield "Markus L" wrote in message ... Chuck Waterfield wrote: I have a situation where I need to insert formulas containing sheetnames, and test for situations where the sheetname may not exist in the workbook. Take a look at the IsSheet function published by Jake in this newsgroup back in 1998. Works great for me. http://groups.google.com/groups?q=is...elm=35F53650.D 61F0218%40wwa.com&rnum=4 In case the link above doesn't work, here's the function: Public Function IsSheet(strSheetName As String) IsSheet = False For Each ws In Worksheets If ws.Name = strSheetName Then IsSheet = True Exit For End If Next ws End Function Markus |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
GetOpenFilename | Excel Programming | |||
GetOpenFilename | Excel Programming | |||
GetOpenFilename | Excel Programming | |||
GetOpenFilename | Excel Programming | |||
Using GetOpenFilename | Excel Programming |