Thread for opening trusted location and show text files only

chugi

New Member
Joined
Nov 14, 2023
Messages
1
Office Version
  1. 2019
Platform
  1. Windows
Hi every one.

I am very new to VBA and have just started exploring macros.

I have a monthly activity to extract a text file inventory listing into excel. When i program the macros for opening the file, I select the text file available in the folder but, this file name may change month on month. Also, i need to select all files to see this text file and it doesn't show in the initial dialogue box.

Would much appreciate a thread to allow me a dialogue box showing a selection of the text files (for respective months inventory listings) after selecting which, I may proceed with the next steps of the macro.

My apologies if this has been covered elsewhere in the forum.

Thanks.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Not sure if I understand, but it seems you could use the msoFileDialogFilePicker and set its multi select property to true in the process. That would allow you to raise a file dialog (looks like Windows File Explorer) and loop over the chosen files to do whatever it is you have in mind with those selections.
 
Upvote 0

Forum statistics

Threads
1,215,083
Messages
6,123,020
Members
449,092
Latest member
ikke

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