2

I have a public function that is referencing objFileDialog, which worked fine on one user's PC. However, when moving the project to another PC, I get the error in the title.

It seems that a library may not be enabled on the other user's computer, but I'm not sure what library objFileDialog is housed in.

I would refer to the previous user's PC to match up libraries, but it's already been wiped and reimaged.

enter image description here

aLearningLady
  • 1,988
  • 4
  • 24
  • 42
  • 2
    Does the other user's computer have a different version of Access? Tools->References will show the missing ones. `FileDialog` is in the Microsoft Office x.x Object Library. – Comintern Sep 30 '16 at 15:32

1 Answers1

3

See here: https://support.microsoft.com/en-us/kb/824272

You need to reference:Microsoft Office 11.0 Object Library

To do this select Tools> References and check the bok with the reference above

Preston
  • 7,399
  • 8
  • 54
  • 84
  • 2
    The *version* of the Object Library depends on what is installed on the target machine. – Comintern Sep 30 '16 at 15:33
  • Microsoft Office 15.0 Object Library is referenced on the machine and we still get that error. – aLearningLady Sep 30 '16 at 15:38
  • 1
    have a look here, could be another library? http://stackoverflow.com/questions/507191/cant-find-project-or-library-for-standard-vba-functions – Preston Sep 30 '16 at 15:42
  • 4
    @Dr.Trey Verify Tools -> References; if any says `(missing)`, that's what you need to fix. – Mathieu Guindon Sep 30 '16 at 15:51
  • 2
    Are you using Office 15 (2013)? If not you might need to unselect vers15 and select the correct version of Microsoft Office XX.0 Object Library in the references. – CyberClaw Sep 30 '16 at 15:51