PDA

View Full Version : [SOLVED] Active X "Missing" error when others attempt to use file



jackievdb
06-03-2015, 08:32 AM
My excel file contains numerous worksheets which are hidden and a main menu which links to each worksheet. Worksheet unhides when link is selected on main menu and re-hides when "Back to Menu" link is selected in the worksheet. Works fine for me but when anyone else trys to use this worksheet they get an error. Have traced it back via ALT F11, Tools, References and a checked box starting with "MISSING: Active X . . . " Once they uncheck this box it works. Need to correct this so they don't have to go through all of that to correct the error. Thanks.

SamT
06-03-2015, 09:04 AM
Show us your code. Click the # icon on the menu and paste the code in between the two [ Code } [ /Code ] tags

jackievdb
06-03-2015, 09:32 AM
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
LinkTo = Target.SubAddress
WhereBang = InStr(1, LinkTo, "!")
If WhereBang > 0 Then
MySheet = Left(LinkTo, WhereBang - 1)
MySheet = Application.WorksheetFunction.Substitute(MySheet, "'", "")
Worksheets(MySheet).Visible = True
Worksheets(MySheet).Select
MyAddr = Mid(LinkTo, WhereBange + 1)
Worksheets(MySheet).Range(MyAddr).Select
End If


End Sub



Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Worksheets("Menu").Select
Target.Parent.Worksheet.Visible = False

End Sub

Kenneth Hobs
06-03-2015, 10:04 AM
That code would not produce the problem.

It is best not to use early binding methods to avoid such problems.

There can be a security issue when adding and deleting references by code. If you do use the early bound object references, if you know which one is the problem, you can try adding and deleting as shown for Outlook in:
http://www.excelforum.com/excel-programming/670865-vba-references.html

jackievdb
06-03-2015, 11:44 AM
Thank you for your response Kenneth. I did not write the code. I found it on the internet when looking for code to perform what I wanted to occur. Is there a better code that will perform the same function?

jackievdb
06-03-2015, 12:18 PM
13594
Here is the error that is being received when someone other than myself tries to use the links in the Excel file.

Kenneth Hobs
06-03-2015, 12:44 PM
I can't see from that. Check your Tools > References > for the missing reference. Attach a file if you like.

jackievdb
06-03-2015, 01:05 PM
I was able to fix the issue by un-checking my Active X in the References list and saving the document. Thanks for the help!