Costas
Member
Hi Chandoo,
I'm using the .InitialFileName to filter on MyLocation which can be NSW, VIC or QLD. This works fine but I also need to filter on both one location and nationwide e.g. NSW or ALL. I tried typing MyLocation &";ALL" but no joy. Here is my code:
Is there a way to do that?
Thanks
Costas
I'm using the .InitialFileName to filter on MyLocation which can be NSW, VIC or QLD. This works fine but I also need to filter on both one location and nationwide e.g. NSW or ALL. I tried typing MyLocation &";ALL" but no joy. Here is my code:
Code:
Sub FileOpenDialogBox()
MyPath = ThisWorkbook.Path & "\For updating\"
ChDir MyPath
With Application.FileDialog(msoFileDialogFilePicker)
.InitialFileName = MyLocation & "_" & MySubName & "*"
.AllowMultiSelect = False
.Filters.Add "Excel ", "*.xlsx; *.xls", 1
.Show
MyFullPath = .SelectedItems.Item(1)
End With
Workbooks.Open FileName:=MyFullPath
MyWbName = ActiveWorkbook.Name
MyAnswer = vbYes
End Sub
Is there a way to do that?
Thanks
Costas