How to reference file paths given in text box on user form by a user and then perform execution using command buttons on the given file path.

Shriddhi Parab

New Member
Joined
Jan 22, 2015
Messages
9
Hello All,

I have certain tasks to be performed for which I have my command buttons on a user form. what I need to do and facing difficulty is that I want the user to input his/her required file name in a text box on the user form and the command buttons should perform execution on that file name.

for eg :
------------example of form lay out starts------
Please enter file name : C:\macro\abc.xls

Command : High Light Duplicates.
Command : Delete Duplicate
Command : Add Codes.

----------example of form lay out ends---------

Now the file name given by user, I need to reference it as input for operations written in the vba codes for command buttons given as above. It totally depends on the user on which action he /she needs to perform.

Please help me with different workbook referencing.
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
I have my codes ready for command buttons .. I need help in referencing file name given by user in text box and how will I link my command button codes to perform execution on the file name.
 
Upvote 0

Forum statistics

Threads
1,214,423
Messages
6,119,398
Members
448,892
Latest member
amjad24

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