If you can set the 'initial' path of an OpenFileDialog box by something like
the following:
Dim FilesPath As String ' Files Path
FilesPath = "P:\Projects\"
FilesPath = OpenFileDialog1.InitialDirectory
HOW can you set a 'current' path?
For example:
My application has 2 OpenFileDialog boxes (#1 and #2). In #1, I use it to
select specific files.... then they get written to a TXT type file.
My 2nd OpenFileDialog box opens the TXT file, etc. Which will not necessarily
be in the Same Folder as #1 files!
What I want to achive is that IF I use #1 to select files in say Folder "A",
and then use #2 to open my TXT file (which is in a different Folder "B"), how
can I synch #1 Open folder location to match #2's? This is because I want to
open an existing TXT file and ADD more files from the same location as where
the TXT file is (using OpenFileDialog #1). Remember that I used #2 to Open
the TXT file!
Or will it be easier to simply change the File Open extension for #2 instead?
Regards,
Bruce 11 2255
If I understand you correctly . . .
fileDialog1.InitialDirectory = fileDialog2.InitialDirectory
fileDialog1.ShowDialog
--
OHM ( Terry Burns )
. . . One-Handed-Man . . .
Time flies when you don't know what you're doing
"Mr. B" <Us**@NoWhere.com> wrote in message
news:bv********************************@4ax.com... If you can set the 'initial' path of an OpenFileDialog box by something
like the following:
Dim FilesPath As String ' Files Path FilesPath = "P:\Projects\" FilesPath = OpenFileDialog1.InitialDirectory
HOW can you set a 'current' path?
For example:
My application has 2 OpenFileDialog boxes (#1 and #2). In #1, I use it to select specific files.... then they get written to a TXT type file.
My 2nd OpenFileDialog box opens the TXT file, etc. Which will not
necessarily be in the Same Folder as #1 files!
What I want to achive is that IF I use #1 to select files in say Folder
"A", and then use #2 to open my TXT file (which is in a different Folder "B"),
how can I synch #1 Open folder location to match #2's? This is because I want
to open an existing TXT file and ADD more files from the same location as
where the TXT file is (using OpenFileDialog #1). Remember that I used #2 to
Open the TXT file!
Or will it be easier to simply change the File Open extension for #2
instead? Regards,
Bruce
Out of curiosity, what does "H2:" mean in your subject line?
With Deft Fingers, "Jeff Johnson [MVP: VB]" <i.***@enough.spam> wrote: Out of curiosity, what does "H2:" mean in your subject line?
How To (:
Sorry.. I thought that was a common one!
Bruce
With Deft Fingers, "One Handed Man \( OHM - Terry Burns \)"
<news.microsoft.com> wrote: If I understand you correctly . . .
fileDialog1.InitialDirectory = fileDialog2.InitialDirectory fileDialog1.ShowDialog
Hmmm... I tried something like that and I didn't work.
What I was wanting to do was to Synchronize the two FileDialog's...
But I'm currently playing with only using One "FD" and switching back and
forth between their Drawing Filters. I've a few bugs to iron out, but it
seems to be the way I should have approached this at first.
Regrards,
Bruce
Hold on, do you mean you want to sync them when they are both open ?
--
OHM ( Terry Burns )
. . . One-Handed-Man . . .
Time flies when you don't know what you're doing
"Mr. B" <Us**@NoWhere.com> wrote in message
news:ru********************************@4ax.com... With Deft Fingers, "One Handed Man \( OHM - Terry Burns \)" <news.microsoft.com> wrote:
If I understand you correctly . . .
fileDialog1.InitialDirectory = fileDialog2.InitialDirectory fileDialog1.ShowDialog
Hmmm... I tried something like that and I didn't work.
What I was wanting to do was to Synchronize the two FileDialog's...
But I'm currently playing with only using One "FD" and switching back and forth between their Drawing Filters. I've a few bugs to iron out, but it seems to be the way I should have approached this at first.
Regrards,
Bruce
With Deft Fingers, "One Handed Man \( OHM - Terry Burns \)"
<news.microsoft.com> wrote: Hold on, do you mean you want to sync them when they are both open ?
Boy... I've never had this much difficulties in describing my issue (:
.... Sych them yes.... but not at the 'same' time.
For example... if #1 is used to select a file in folder "A", and #2 is used to
open a file in folder "B"... Now I go bak and use #1... it would like it to
look in folder "B" without me ckicking to the folder.
But, I don't think that there is a means to 'force' a specific folder... Other
than the "initial" start folder. So another folder 'after' the initial folder
has been used.
Not to worry.... I'm getting around it by changing the file string in #1.
But it would be of interest to know if the above 'could' be done.
Regards,
Bruce
OK, then this is easy. At class level
Private LastUsedDialogOpenDirectory As String
When you use your DialogBoxes, set the LastUsedDirectory, if it is "", then
dont use it otherwise do !
--
OHM ( Terry Burns )
. . . One-Handed-Man . . .
Time flies when you don't know what you're doing
"Mr. B" <Us**@NoWhere.com> wrote in message
news:4b********************************@4ax.com... With Deft Fingers, "One Handed Man \( OHM - Terry Burns \)" <news.microsoft.com> wrote:
Hold on, do you mean you want to sync them when they are both open ? Boy... I've never had this much difficulties in describing my issue (:
... Sych them yes.... but not at the 'same' time.
For example... if #1 is used to select a file in folder "A", and #2 is
used to open a file in folder "B"... Now I go bak and use #1... it would like it
to look in folder "B" without me ckicking to the folder.
But, I don't think that there is a means to 'force' a specific folder...
Other than the "initial" start folder. So another folder 'after' the initial
folder has been used.
Not to worry.... I'm getting around it by changing the file string in #1.
But it would be of interest to know if the above 'could' be done.
Regards,
Bruce
With Deft Fingers, "One Handed Man \( OHM - Terry Burns \)"
<news.microsoft.com> wrote: OK, then this is easy. At class level
Easy for you maybe (:
Private LastUsedDialogOpenDirectory As String
When you use your DialogBoxes, set the LastUsedDirectory, if it is "", then dont use it otherwise do !
Verryy intersting! That's great! Thanks muchly.
BTW, where does all this 'knowledge' come from? I mean, is there a book you
have that has all this 'hidden' stuff? Or what?
I guess with the 6+ books I have, unless I specifically know what to look for,
this sort of info is all but impossible to find.
Thanks muchly!
Bruce
Mr B.
It's basically a case of going through the pain. After a while you have
tried lots of stuff, got stuck , got through it, etc.
One time in the future, someone will ask this question again, and you will
be ready !
;-)
Regards
--
OHM ( Terry Burns )
. . . One-Handed-Man . . .
Time flies when you don't know what you're doing
"Mr. B" <Us**@NoWhere.com> wrote in message
news:at********************************@4ax.com... With Deft Fingers, "One Handed Man \( OHM - Terry Burns \)" <news.microsoft.com> wrote:
OK, then this is easy. At class level Easy for you maybe (:
Private LastUsedDialogOpenDirectory As String
When you use your DialogBoxes, set the LastUsedDirectory, if it is "",
thendont use it otherwise do !
Verryy intersting! That's great! Thanks muchly.
BTW, where does all this 'knowledge' come from? I mean, is there a book
you have that has all this 'hidden' stuff? Or what?
I guess with the 6+ books I have, unless I specifically know what to look
for, this sort of info is all but impossible to find.
Thanks muchly!
Bruce
With Deft Fingers, "One Handed Man \( OHM - Terry Burns \)"
<news.microsoft.com> wrote: It's basically a case of going through the pain. After a while you have tried lots of stuff, got stuck , got through it, etc.
One time in the future, someone will ask this question again, and you will be ready !
True... like it is written...
"experience" is something you get After you need it"
(:
Thanks!
Bruce
A truly excellent quote !
--
OHM ( Terry Burns )
. . . One-Handed-Man . . .
Time flies when you don't know what you're doing
"Mr. B" <Us**@NoWhere.com> wrote in message
news:9a********************************@4ax.com... With Deft Fingers, "One Handed Man \( OHM - Terry Burns \)" <news.microsoft.com> wrote:
It's basically a case of going through the pain. After a while you have tried lots of stuff, got stuck , got through it, etc.
One time in the future, someone will ask this question again, and you
willbe ready !
True... like it is written...
"experience" is something you get After you need it"
(:
Thanks!
Bruce This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: bobrad |
last post by:
MAYBE SOMEBODY CAM HELP
I AM USING THE FOLLOWING CODE TO GET A LOCATION OF A FILE IN A WINFORM
DIALOG
OpenFileDialog openFileDialog = new OpenFileDialog();
OpenFileDialog.Filter = " Access...
|
by: Nagachandra Sekhar Grandhi |
last post by:
I am facing a problem with OpenFileDialog. It is as follows.
I opened OpenFileDialog dialog box and selected a folder in it. After
selecting the folder when i tried to delete the same folder in...
|
by: Geoff Jones |
last post by:
Hi
Can anybody tell me how to specify the startup location of an
OpenFileDialog?
Thanks in advance
Geoff
|
by: Mr. B |
last post by:
If you can set the 'initial' path of an OpenFileDialog box by something like
the following:
Dim FilesPath As String ' Files Path
FilesPath = "P:\Projects\"
FilesPath =...
|
by: juststarter |
last post by:
Hello all,
I am using an openFileDialog box to select a file (in order to insert it in
a database). When the file is selected i am filling a few textboxes with the
actual path, filename and...
|
by: Greg |
last post by:
I'm a bit confused by this - when I set the InitialDiretory of an
OpenFileDialog to be a subfolder within the same folder as the app, the
file dialog does not initially display the folder - instead...
|
by: NickP |
last post by:
Hi there,
This is really crazy!
1. Make a folder
2. Put a text file in the folder
3. Run the following code...
Dim pop As New OpenFileDialog
Using pop
|
by: sam |
last post by:
OpenFileDialog appears to be "holding onto" the parent folder of a
selected file until the application using the dialog quits.
After creating a folder containing a file, I attempted to select...
|
by: MikeY |
last post by:
Hi everyone,
I"m having a problem with the OpenFileDialog() changing my path to save to
my .resources file. I'm a bit baffled why this is happening, even when I
set the OpenFileDialog back to...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
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...
| |