ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   finding the right file (https://www.excelbanter.com/excel-programming/329902-finding-right-file.html)

Lou Sanderson

finding the right file
 
I'm having trouble getting what I need out of Excel's 'get external data'
function. I need to get some data from some MS Access queries I have written,
but I need Excel to ask me which .mdb file to get the data from before it
retreives it. can anyone help? thanks

Jim Rech

finding the right file
 
I'm not sure if this helps in your specific case but, in general, you ask
for a file like this:

Sub a()
Dim FName As Variant
FName = Application.GetOpenFilename("Access files (*.mdb),*.mdb")
If FName < False Then
''Your code
Else
MsgBox "user cancelled"
End If
End Sub

--
Jim
"lou sanderson" wrote in message
...
| I'm having trouble getting what I need out of Excel's 'get external data'
| function. I need to get some data from some MS Access queries I have
written,
| but I need Excel to ask me which .mdb file to get the data from before it
| retreives it. can anyone help? thanks




All times are GMT +1. The time now is 10:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com