Drop down menu

Jorn

Board Regular
Joined
Jul 10, 2003
Messages
92
Good Afternoon,

I need to be able to open spreadsheets from a form. Can i create a dropdown menu that will enable the user to surf the directories for the appropriate file? (just like using the open command in the file menu)

Is this possible? im using excel 97

Regards

John.
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
I am working with excel 97 and dont appear to have this option. I have searched and searched about this problem in the help files and have found very little.

John.
 
Upvote 0
Just to be clear, are you certain you looked in the VBA help? Excel help and VBA help are 2 separate things.

Press alt+F11 to open the Visual Basic Editor, then press F1 to bring up the VBA help.
 
Upvote 0
Hi John
I went into the VBA Editor pressed F1 and typein in
Getopenfilename and got this Xl97;
Make sure you are in VBA before searching.

Displays the standard Open dialog box and gets a file name from the user without actually opening any files.

Syntax

expression.GetOpenFilename(FileFilter, FilterIndex, Title, ButtonText, MultiSelect)

expression Required. An expression that returns an Application object.

FileFilter Optional Variant. A string specifying file filtering criteria.

In Windows, this string consists of pairs of file filter strings followed by the MS-DOS wildcard file filter specification, with each part and each pair separated by commas. Each separate pair is listed in the Files of type drop-down list box. For example, the following string specifies two file filters, text and addin: "Text Files (*.txt),*.txt,Add-In Files (*.xla),*.xla".

To use multiple MS-DOS wildcard expressions for a single file filter type, separate the wildcard expressions with semicolons; for example, "Visual Basic Files (*.bas; *.txt),*.bas;*.txt".

If omitted in Windows, this argument defaults to "All Files (*.*),*.*".

On the Macintosh, this string is a list of comma-separated file type codes (for example, "TEXT,XLA5,XLS4"). Spaces are significant and shouldn't be inserted before or after the comma separators unless they're part of the file type code. If omitted, this argument defaults to all file types.

FilterIndex Optional Variant. Windows only (ignored on the Macintosh). Specifies the index numbers of the default file filtering criteria, from 1 to the number of filters specified in FileFilter. If this argument is omitted or greater than the number of filters present, the first file filter is used.

Title Optional Variant. Windows only (ignored on the Macintosh). Specifies the title of the dialog box. If this argument is omitted, the title is "Open."

ButtonText Optional Variant. Macintosh only (ignored in Windows). Specifies the text used for the Open button in the dialog box. If this argument is omitted, the button text is "Open."

MultiSelect Optional Variant. True to allow multiple file names to be selected. False to allow only one file name to be selected. The default value is False

Remarks

This method returns the selected file name or the name entered by the user. The returned name may include a path specification. If MultiSelect is True, the return value is an array of the selected file names (even if only one filename is selected). Returns False if the user cancels the dialog box.

This method may change the current drive or folder.
 
Upvote 0
Thank you.

I am concerned that i dont have this in my visual basic help, all of my add ins have been expanded etc etc but i enter "getopen" into my search field and i have no options.

thank you for your help.

John.
 
Upvote 0

Forum statistics

Threads
1,216,128
Messages
6,129,040
Members
449,482
Latest member
al mugheen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top