Microsoft KB Archive/59838

{| = Choosing OK Doesn't Close (Custom) Dialog Box in Excel =
 * width="100%"|

Last reviewed: November 4, 1994

Article ID: Q59838

SUMMARY
When using a linked file/directory box in a dialog box, wildcard characters left in the File Name text box (the item #6 before items #18 and #19) cause Excel to keep the dialog box on the screen. This behavior is normal operation. With any linked file/directory box, Excel assumes that a filename is required before continuing macro execution.

MORE INFORMATION
There is no way to use a linked file/directory box for an optional filename, nor any way to cause Excel to ignore wildcard characters in a linked file/directory box. If you leave the File Name text box blank and choose OK (press ENTER), Excel places *.* in the text box and returns the dialog box, expecting you to select from the list of files in the current directory.

Choosing Cancel or pressing ESC does permit the dialog box to close without a specified filename; however, any other data you enter will be lost.