VBA Compiler error can't find object or Library

Kobus-Dippenaar

Registered User.
Local time
Today, 23:24
Joined
Oct 10, 2014
Messages
50
Good day to all the Access Professionals,
I have a program running with VBA coding, whereby the user enter a password which then sets the field attributes to enable the user to change them.
This is working on my laptop, on the client's LAN, it also worked through REMOTE DESKTOP, but the Head Office installed new PCs and now the REMOTE DESKTOP cause a problem. Please see two attached clips.

Awaiting your reply,

Blessings
 

Attachments

  • SnipImage.JPG
    SnipImage.JPG
    90 KB · Views: 99
  • References.jpg
    References.jpg
    102.3 KB · Views: 97
Which line is raising the error?

If you have Option Explicit at the top of all your modules, then Debug > Compile in the VBA Editor should jump straight to the problem variable / object

(If you don't - add it, then do as above and tell us the line it highlights)
 
@AOB,
Thx, On my laptop, without OPTION EXPLICIT being set the code goes through, it works fine. With OPTION EXPLICIT set, it bombs out at TEL = 0 with a message that the variable is not set.

Do I use a DIM statement to set it?
 
@AOB,
I have declared storage via as DIM Tel AS Double
It seems fine, will test it on site tomorrow.
Thanks for your help,

God Bless.
 
Morning... :D

Yes, Option Explicit forces you to explicitly declare all your variables in advance. In my opinion, it should be used in every module / code object. It makes trapping errors like these significantly easier. Dim them all at the start.

Hope it works on site for you!
 

Users who are viewing this thread

Back
Top Bottom