Custom User form containing a browse to file field

Fizzyfish

New Member
Joined
Aug 3, 2011
Messages
13
I need to create a custom form to allow users to enter some data via a text field and a radio selection. Also I need to allow users to browse to a file and select it, after which I can get the file name and put it into a variable for use later.

I can create the user form and user input fields but I am stuck on how to add a file browser control to the form. Can anyone help with this?

Thanks,
Sherry
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
See Application.GetOpenFilename
 
Upvote 0
get the file name and put it into a variable for use later.

You'd better store the filename in a hidden control, or in the Tag property of an existing control. I do not feel very confortable with "for later use". Depending on what "later" is, the variable could not contain what you wanted ;-)
 
Upvote 0
You'd better store the filename in a hidden control, or in the Tag property of an existing control. I do not feel very confortable with "for later use". Depending on what "later" is, the variable could not contain what you wanted ;-)


The variable works fine, since I pass it to a procedure from the procedure where I create it. :)
 
Upvote 0

Forum statistics

Threads
1,224,562
Messages
6,179,526
Members
452,923
Latest member
JackiG

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