Microsoft Access FldrPicker - which reference?

In my VBA, I need to use the following code:
Set FldrPicker = Application.FileDialog(msoFileDialogFolderPicker)

Which Reference do I need for this - VBA / Tools / References
rick_dangerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rey Obrero (Capricorn1)Commented:
add the Microsoft Office xx.x object library
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Rey Obrero (Capricorn1)Commented:
you can also use late binding and no need to add the reference library

Function fSelectFolder()
Dim fd As Object, strFolderPath
Set fd = Application.FileDialog(4)
With fd
      .InitialView = 2
     .Title = "Select Folder"
     .InitialFileName = CurrentProject.Path '& "\"
     If .Show Then
          fSelectFolder = .SelectedItems(1)
     End If
End With

End Function
0
rick_dangerAuthor Commented:
Thanks - nice clear solution!

As an aside, in general, how do I find out which Reference I need? Apart from asking you!
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Rey Obrero (Capricorn1)Commented:
<As an aside, in general, how do I find out which Reference I need?> that all  depends on the type of objects you are using in your codes.
0
rick_dangerAuthor Commented:
Well yes. But if I get an error which means I have not selected a reference, how do I know which reference I shoudl select. Like this particualr problem, which you have solved - how would I have found the answer myself?
0
Rey Obrero (Capricorn1)Commented:
one way to find that out is to place your cursor  in the FileDialog on this line

Set FldrPicker = Application.FileDialog(msoFileDialogFolderPicker)

and hit F1, see what happens
0
rick_dangerAuthor Commented:
Not a lot, but thanks for your help anyway.
0
Rey Obrero (Capricorn1)Commented:
what do you mean? did you see the help window?
0
rick_dangerAuthor Commented:
Yes, but it was less than helpful.

Keyword Not Found, Office Shared [vblr6.chm1009553]

Hi there! You have landed on one of our F1 Help redirector pages. Please select the topic you were looking for below.

Keyword Not Found
0
Rey Obrero (Capricorn1)Commented:
i don't know why you can't see it, but here is the Link with the same content as the Help file

https://msdn.microsoft.com/en-us/library/office/Ff196794.aspx?f=255&MSPPError=-2147217396

see the note    ' Requires reference to Microsoft Office 11.0 Object Library.
0
rick_dangerAuthor Commented:
OK, thanks!

It's quite hidden away, but a simple search found it. I'm very grateful for your help!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.