Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selecting files/folders/domains(in LAN) using VBA !

Status
Not open for further replies.

FaneDuru

Technical User
Jul 15, 2002
141
RO
How is possible to use the Browse window to select a file (folder, domain in network) which, to be used like object in the next rows of the code ?

I am interested in selecting a specific domain, but I will be also satisfied with a folder or a file.

Thanks !
 
Hi,
If you are in Excel, then you have it -- otherwise set a reference to Excel

use GetOpenFilename...
Code:
fileToOpen = Application _
    .GetOpenFilename("Text Files (*.txt), *.txt")
If fileToOpen <> False Then
    MsgBox &quot;Open &quot; & fileToOpen
End If
Check in Help. Change the file type and you're off!

Do whatever you want with fileToOpen -- :) Skip,
Skip@TheOfficeExperts.com
 
Thanks, Skip,

I used GetOpenFilename but it works only for files (or I don't know how to use it) and I need to be able to select computers (names) in a speciffic domain in LAN. Is it possible using that ?

Thanks again,
Fane
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top