gheyman

Well-known Member
Joined
Nov 14, 2005
Messages
2,340
Office Version
  1. 365
Platform
  1. Windows
I am trying to open my database on a different PC and I am getting these error messages. I don't get them on mine (we are using the same versions of Access).

"Your Microsoft Access database or project contains a missing or broken reference to the file "MSCOMCTL.OCX" version 2.2.

Then a another message "Microsoft Access cannot run the macro or callback function "GetVisible".

I get a compile error

The Line "Public Sub CloseThisForm (vstr as Form)' is highlighted in yellow

Code:
Public Sub CloseThisForm(vstr As Form)
'+=============================================================+
' Copyright by Paul Goldbeck. All Rights Reserved.
'Created: 23.03.98
'Last change: 23.03.98
'+=============================================================+

On Error GoTo CloseThisFormError
  
  DoCmd.Close A_FORM, CStr(vstr.Name)

CloseThisFormDone:
  Exit Sub

CloseThisFormError:
  DisplayError Err, Error$, "Fnc::CloseThisForm()"
  Resume CloseThisFormDone

End Sub
It also highlights "Error$"

Anyone know whats going on?
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Open the VBE (Alt + F11)
Click on Tools
Click on references
See if there are any missing References and if so add them
Close and Save the VBE changes.
 
Last edited:
Upvote 0
Sounds like you may have some missing libraries/references.

Open the database on your computer, go into the VB Editor, then go to the Tools menu and select References.
Note all the different references that are selected.

Now go to the other computer and make sure that all the same references are selected. If you are on different versions of Office, the version number might be slightly different, but pick the closest ones.

See if that resolved the issue.


EDIT: In the time I was typing this up, I see Alan already replied with the same advice!
 
Last edited:
Upvote 0
Thanks, I wont be able to check this until I get home and check what's selected there. It sounds like this should resolve the problem.
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,694
Members
448,979
Latest member
DET4492

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top