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

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
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,214,940
Messages
6,122,356
Members
449,080
Latest member
Armadillos

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