ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Navigating To Find A File (https://www.excelbanter.com/excel-programming/301885-navigating-find-file.html)

Paul W Smith[_3_]

Navigating To Find A File
 
I want to add functionality to a user form which allows a user to navigate
through the folder structure and selects a file. I wish to invoke this
procedure on a button push.

A while a go, and this is where my memory dims, I am sure I had some form of
easy way of doing this, but for the life of me I cannot recall accurately.
I wish to see some for of windows Explorer-like interface appear. I seem to
recall either com API calls were involved or some custom functions.

Can anyone help my failing memory?

PWS



medialint[_2_]

Navigating To Find A File
 
Wishes granted for a limited time only. Now, if this were Access we'd have a lot more fun. But this is Excel, so it's pretty simple:

Private Sub CommandButton1_Click()
Dim strMyFileToOpen As String
Dim strMyFileToSave As String
strMyFileToOpen = Application.GetOpenFilename("Text Files (*.txt), *.txt")
strMyFileToOpen = Application.GetSaveAsFilename("Text Files (*.txt), *.txt")
End Sub



"Paul W Smith" wrote:

I want to add functionality to a user form which allows a user to navigate
through the folder structure and selects a file. I wish to invoke this
procedure on a button push.

A while a go, and this is where my memory dims, I am sure I had some form of
easy way of doing this, but for the life of me I cannot recall accurately.
I wish to see some for of windows Explorer-like interface appear. I seem to
recall either com API calls were involved or some custom functions.

Can anyone help my failing memory?

PWS




BrianB

Navigating To Find A File
 
Have a look at VB Editor/Search for GetOpenFileNam

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 02:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com