Thankyou for your answer
In my databse I use macro to import data and do something to append it. That
means I must define file name in macro but I want to browse file, not define
file in macro. Is it possible?
Don't worry if you don't understand the code! <g> Copy everything in the
shaded area between Code Start and Code End, paste it into a new module and
save the module. (make sure you don't name the module the same as any of the
routines within it)
To use, you can simply call GetOpenFile(), and a dialog will open for you.
If you want to start the dialog in a particular location, use
GetOpenFile("C:\MyFolder"). If you want the dialog to have a custom title,
use GetOpenFile(varTitleForDialog:="Pick a file, any file!") (note there's a
semi-colon in front of the equal sign)