LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default GetOpenFileName bug

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
GetOpenFilename Todd Htutenstine Excel Programming 2 May 13th 04 03:14 PM
GetOpenFilename Greg Bloom Excel Programming 0 February 9th 04 03:32 PM
GetOpenFilename Wolfgang Excel Programming 1 February 6th 04 07:37 PM
GetOpenFilename Hasan Cansü Excel Programming 0 September 24th 03 01:32 PM
Using GetOpenFilename Robin Seaby Excel Programming 2 August 6th 03 04:50 PM


All times are GMT +1. The time now is 05:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"