Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.
To change the default setting in the
Files of type box, follow these steps:
- Close and save any open workbooks, and then create a new workbook.
- Start the Visual Basic Editor (press ALT+F11).
- On the View menu, click Project Explorer.
If Personal.xls exists, it is listed in the Explorer pane. If Personal.xls
is listed, go to step 6. If it does not exist, click Close and return to
Microsoft Excel on the File menu. - On the Tools menu, point to Macros and click Record New Macro. Click
Personal Macro Workbook in the Store macro in list and click OK.
A Stop Recording toolbar appears. - Click Stop, and then start the Visual Basic Editor (press ALT+F11).
- In Project Explorer, click VBAProject(PERSONAL.XLS) and click Module
on the Insert menu.
- If you recorded a macro in steps 4 and 5, you may delete the text in the module you recorded.
- Type the following macro:
Sub Open_File()
Application.Dialogs(xlDialogOpen).Show Arg1:="*.*"
End Sub
- On the View menu, click Microsoft Excel.
- On the Tools menu, click Customize and click the Commands tab.
- On the File menu, click Open.
Note that Modify Selection in the Customize dialog is available. - In the Customize dialog box, click Modify Selection.
"&Open" appears in the Name box. - Click Assign Macro. Click "PERSONAL.XLS!Open_File" and click OK.
- On the worksheet menu bar, click File.
This step causes the File menu to collapse. - Click the Open button on the Standard toolbar and repeat steps 12 and 13.
The selected name referred to in step 12 should be "Open". - In the Customize dialog box, click Close.
- On the File menu, click Exit. When you are prompted to save changes to
Personal.xls, click Yes. If you are prompted to save changes to Book1,
click No.