VBA How to open browser in an specific path

AccOUCH

Registered User.
Local time
Today, 06:39
Joined
Sep 27, 2018
Messages
25
Hi! I'm trying to open the file browser from VBA with this code:

Code:
    Dim S As String
    S = OpenCommDlg("Magazine.txt")

And It's ok but it opens the window of the "C:\A\B" Path
And I want it to open "C:" path

No way to change it giving that path to the function...
Any idea?
 
Hi. Can you post the code for OpenCommDlg()?
 
Sounds like it is trying to open in a default directory, perhaps?

I'm with theDBGuy - we need to see the OpenCommDlg code to know why it is doing what it is doing - and in particular why you think you CAN'T give it the explicit path.
 
Thaks guys, you gave the clue to solve this.
Function OpenCommDlg(ByVal DirBusqueda As String), far from being a default VBA Function, is a Function added to the project by another programmer. Soo...I only had to change the default path created there to achieve my aim.
 
Hi. Glad to hear you got it sorted out. Good luck with your project.
 

Users who are viewing this thread

Back
Top Bottom