Creating an Access Add-In that can be used by all users - "Connect" error
-
I'm having trouble getting an Access plugin working for all users. The setup application installs/registers the dll and associated tlb file absolutely fine (installed for all users) and my VBA code (below) also works successfully when logged in as an administrator, but attempting to use it under a non-privileged user account fails here:
Private Sub Form_Load()
With COMAddIns("MyPlugIn.Connect")
' Make sure the COM add-in is loaded.
.Connect = True ' <---- Fails here' Hook up the desired objects. .Object.HookupControls cmdUploadImage End With
End Sub
The returned error is: This add-in is installed for all users on this computer and can only be connected or disconnected by an administrator. Is there any way to prevent this? Some additional information: - The dll/tbl and setup application are all created in C# (.net 3.5) - The target machine is virtualised, so any user could potentially log into it (thus installing the plugin for the active user isn't an option... though if there's a way to silently install the file in a user login script that might work?) Thanks in advance... though I'm more hopeful than expectant! :(