Easy Open File Question

aiden1983

Board Regular
Joined
Feb 19, 2009
Messages
120
How can I get a macro to open up the openfile command to a specific folder ie "C:\Yellow\new folder"?
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
try:
Code:
Workbooks.Open Filename:="C\Yellow\New Folder\Your_Workbook_Name.xls"
 
Upvote 0
or this

Code:
Sub open_file()
Dim bResponse As Boolean
bResponse = Application.Dialogs(xlDialogOpen).Show( _
    "c:\Yellow\new folder\")
If Not bResponse Then Exit Sub
End Sub
 
Upvote 0
try:
Code:
Workbooks.Open Filename:="C\Yellow\New Folder\Your_Workbook_Name.xls"
I can't use this as the name of the file is always changing (this is why I am having an issue). The other suggestion doesn't work either.
 
Upvote 0
did you put mine in as it was, all it will do is open the xlDialogOpen box to your folders. to let you pick a file. what excel you use?
 
Upvote 0
did you put mine in as it was, all it will do is open the xlDialogOpen box to your folders. to let you pick a file. what excel you use?

Ya I tried yours and yes it opens the box up but not to the folder I would like. I might just be our server here that is the issue. If there is no simple solution they will just have to search foe the folder themselves.
 
Upvote 0
it works on mine each time, check the file loc in the code i my have it with to much space in the names.
 
Upvote 0

Forum statistics

Threads
1,222,437
Messages
6,166,024
Members
452,008
Latest member
Customlogoflipflops

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top