Please explain the difference between these

Eisasuarez

Well-known Member
Joined
Mar 23, 2012
Messages
653
Hi Can someone please explain what the difference is between these and when to use 1 over the other

Application.GetOpenFilename
Application.Dialogs(xlDialogOpen).Show
Application.FileDialog(msoFileDialogOpen).Show
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
The first two don't exist in Access, so I'd stick with the third option. :)
 
Upvote 0
GetOpenFilename doesn't actually open anything, it just returns a file name.
The other two will both open the selected file (assuming you don't press Cancel).

The Dialogs() property returns a Dialog object which only really has Show as a useful method/property (you can pass certain arguments (they vary by dialog) to it).

The FileDialog() property does much the same but has a lot more properties that you can set - it's easier to work with IMO, but there are only 4 FileDialog objects, as opposed to the hundreds of Dialog objects.
 
Upvote 0

Forum statistics

Threads
1,215,159
Messages
6,123,351
Members
449,097
Latest member
thnirmitha

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