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

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
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,223,718
Messages
6,174,082
Members
452,542
Latest member
Bricklin

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