Hyperlink.Address object required? (1 Viewer)

suzeg

Registered User.
Local time
Today, 08:03
Joined
Jun 20, 2012
Messages
27
I am receiving a Runtime error 424 Object required and have no idea why. It was working fine now it gives this error.
I am working on code written by someone else..
The code stops at lblSitePlan.Hyperlinkaddress = ""

Code:
 Private Sub cmdSite_Click()
lblSitePlan.HyperlinkAddress = ""
lblSitePlan.HyperlinkAddress = "Buckhorn%20Church%20MAPS\Buckhorn_Lot%20" + Me.LOT_NO.Value + ".pdf"
Application.FollowHyperlink lblSitePlan.HyperlinkAddress
 End Sub

Thank you again for any help.
 

MarkK

bit cruncher
Local time
Today, 08:03
Joined
Mar 17, 2004
Messages
8,178
Look at the very top of your code module, you'll see something like . . .
Code:
Option Compare Database
Option Explicit
If you do not see Option Explicit, then type it in there and try your code again. Is anything different? Do you get a "Variable not defined" error now?
If so, then lblSitePlan is not a valid variable.
 

suzeg

Registered User.
Local time
Today, 08:03
Joined
Jun 20, 2012
Messages
27
Thank you - you were correct!
 

Users who are viewing this thread

Top Bottom