473,387 Members | 1,535 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,387 software developers and data experts.

Help with FileDialog

Hi,

Below is the VB code I am using to let users select the folder they want to save a file.My problem is once user selects a folder, none of the files in that folder is displayed. I understand it is because I am using FileDialogFolderPicker.
My question is, when user selects a folder, is there a way to show all existing files under that folder, and also let them save the new file in the same folder.
I want users to be able to see all files under the folder they selected so that they can be sure it is the same folder where they saved the file last time. Please help. Thanks.

Dim fd As FileDialog

Set fd = Application.FileDialog(msoFileDialogFolderPicker)

Dim vrtSelectedItem As Variant

With fd
.TITLE = "Select a folder"
.AllowMultiSelect = False
.Show
If .SelectedItems.Count > 0 Then
InputFile = .SelectedItems(1)
End If
End With

Set fd = Nothing
Nov 17 '08 #1
2 2341
lotus18
866 512MB
What version of vb you were using? Why don't you try FileListBox just a suggestion : )


Rey Sean
Nov 18 '08 #2
debasisdas
8,127 Expert 4TB
you need to check for the filter to check the extension of the files.
Nov 18 '08 #3

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

Similar topics

4
by: ulysses | last post by:
Hi, I use PyQt 3.8 non-commercial version in win32. I get a big question. I Can't show PY variable in QT filedialog as initially parameter. Code sample is following:...
3
by: John Field | last post by:
Hello, Is it possible to exclude certain files in a wx.FileDialog, so that the user won't see them and can't select them with the mouse in de File open window? I was thinking of somehow...
2
by: zino | last post by:
I'm using the following code to get the file name and path, but after the user click the file, Excel open it. I don't want the Excel file to open, all I need is to get the file name that the user...
3
by: David Bib | last post by:
Although I'm relatively new to Access VBA, I've done a lot of macro programming in Excel VBA. The problem I'm having is that I get a 'User Type not defined' error at this line - Dim fd As...
3
by: davedwm | last post by:
I have the following code which saves a Text File using a FileChooser which i believe is saving the text as 'UNICode' So when it is loaded back in, or it is opened with NotePad there are spaces which...
16
by: technocraze | last post by:
Hi pals, I would like to know how to display the FileName of the selected file in the textbox and open it using FileDialog property. I have imported the necessary reference from the library -...
2
jamjar
by: jamjar | last post by:
I am trying to use the SaveAs type FileDialog to allow the user to enter a file name. It's only letting me choose exisiting files. Is there any way to use the FileDialog to allow the user to select...
3
by: ALaurie10 | last post by:
Hi I have code below that enables a user to browse for an excel file, import the spreadsheet data, and dump it into a table . I keep receiving 3134 syntax error for "INSERT INTO" statement. Could...
1
by: smugcool | last post by:
hi, i am creating a form with a text field and two command buttons in vb 6.0 I want when somebody will click on command1 button a path will be shown in the text field. And for second command...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.