473,378 Members | 1,549 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

How can I write a command to browse the file folder in Module?

10
Hi

How can I write a command to browse the file folder in Module?

Thank you in advance
Jan 7 '11 #1
1 1398
ADezii
8,834 Expert 8TB
Expand|Select|Wrap|Line Numbers
  1. 'Must 1st set a Reference to the Microsoft Office XX.X Object Library
  2. Dim dlgOpen As FileDialog
  3. Dim vrtSelectedItem As Variant
  4.  
  5. Set dlgOpen = Application.FileDialog(msoFileDialogFolderPicker)
  6.  
  7. With dlgOpen
  8.   .ButtonName = "Open Folder"
  9.   .Title = "Browse Folder Utility"
  10.   .InitialView = msoFileDialogViewLargeIcons
  11.     If .Show = -1 Then
  12.       MsgBox "Selected Folder's Path: " & .SelectedItems(1)
  13.     End If
  14. End With
  15.  
  16. 'Set the object variable to Nothing.
  17. Set dlgOpen = Nothing
Jan 8 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: scoop_77 | last post by:
I'm looking for some software that would allow me to point to a folder in Windows Explorer, and have it output an html file with hyperlinks to all of the files within that folder and all of the...
21
by: strutsng | last post by:
<input type="file"> only allows the user to browse for files. How about "browse for folder" dialog? Can html/javascript do that? I couldn't find any syntax for that. If not, please advise what...
1
by: Mike John | last post by:
I want to write to text file, the follow text " My Name Is mike" Now, I have used the following sysntax: dim strFilePath as string = "C:\" dim strFileName as string = "MyFile.txt" ...
3
by: VB Joshua | last post by:
How do I call a browse for folder dialog? Dim oBrowseFolder As New System.Windows.Forms.FolderBrowserDialog oBrowseFolder.ShowDialog() But I can not show a form modal for some reason?
0
by: Marc Speed | last post by:
I have a windows server 2003 machine that cannot run any aspx pages. The pages are created on my XP machine and run fine on two other servers but this server keeps giving me the following error: ...
3
by: The Woo | last post by:
Can one programatically create a file folder which has the same name as a key field, using a command button? Or, Can there be a a command button which opens up a directory tree to a specified...
4
by: marc | last post by:
Hi, I have 2 activex controls on my form that I need to open up a common dialog box and select/browse files, then populate two text fields. The first one I have working: The first activex...
3
by: ApexData | last post by:
I am using code from the following links to establish a Browse File and Browse Folder dialog. http://www.mvps.org/access/api/api0001.htm http://www.mvps.org/access/api/api0002.htm This code...
2
by: samvb | last post by:
hi guys,.... I am trying to browse a folder located directly under htdocs. The folder, say called 2007 got 6 subfolders inside it, named 1-6. Each of this subfolders got 2 files each. I need to...
1
by: ianoble | last post by:
Hi all, I am running a simple command line Get for a networked VSS database. The command executes properly until it reaches a directory that is corrupted. Because the database is not local, I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.