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

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. I had some complex code that would crash every time,
and ultimately I narrowed down the cause of the crash to the use of
the GetOpenFilename line. This simple procedure below will
demonstrate the problem. The first line works as expected. The
GetOpenFilename works as expected. But then the third line (even
though identical) returns the error Method Formula of object Range
fails. Excel then becomes unstable and will crash when I run other
procedures.

Sub TestOpen()

Range("a1").Formula = "=badsheet!a21"
strOpenName = Application.GetOpenFilename("Excel files, *.xls")
Range("a2").Formula = "=badsheet!a22"

End Sub

Im using Excel 2003. I couldn't find any information on this in the
knowledgebase. Is this a known bug, and does anyone know of a
workaround I could try? I do need to use GetOpenFileName to get the
file with the formulas, and then I do need to test if any of the
formulas contain references to sheetnames which don't exist.

Thanks for any help on this,

Chuck Waterfield
 
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 12:44 PM.

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

About Us

"It's about Microsoft Excel"