![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
In my department, we have new employees who get the departmental A2k3 application thru a "Q Setup" Install program. When the app is being installed and opened, there is code within which is supposed to check to see if the ‘DatePicker’ control (mscomct2.ocx) is present and ‘connected’ to its location in the Windows System32 directory. If that control is not present or 'connected', the code is supposed to connect the 'DatePicker'. I have found that it isn’t working because the new employee is getting a “missing reference” error. Since the code isn’t working, I have to navigate to ‘Code-->Tools-->References' and either find the “Missing” checkbox or "Browse” to the Windows System32 folder and select it to get the DatePicker ‘connected and cancel the error message. I have no direct answer to your question, but if I were to debug this |
#3
| |||
| |||
|
|
In my department, we have new employees who get the departmental A2k3 application thru a "Q Setup" Install program. When the app is being installed and opened, there is code within which is supposed to check to see if the ‘DatePicker’ control (mscomct2.ocx) is present and ‘connected’ to its location in the Windows System32 directory. If that control is not present or 'connected', the code is supposed to connect the 'DatePicker'. I have found that it isn’t working because the new employee is getting a “missing reference” error. Since the code isn’t working, I have to navigate to ‘Code-->Tools-->References' and either find the “Missing” checkbox or "Browse” to the Windows System32 folder and select it to get the DatePicker ‘connected and cancel the error message. My post is a request for assistance in trying to determine why the following code isn’t working: ----------------------------- Public Sub SetReferences() On Error GoTo Err_SetReferences Dim ref As Reference Dim Myflag1 As Boolean Dim Myflag2 As Boolean Myflag1 = False Myflag2 = False For Each ref In References If ref.Name = "Mscomctl2" Then Myflag1 = True End If If ref.Name = "MSCOMCTLLib" Then Myflag2 = True End If Next ref If Not Myflag1 Then References.AddFromFile "C:\WINDOWS\system32\Mscomct2.OCX" End If If Not Myflag2 Then References.AddFromFile "C:\WINDOWS\system32\MSCOMCTL.OCX" End If Exit_SetReferences: Exit Sub Err_SetReferences: MsgBox Err.Description, vbInformation, Me.Caption Resume Exit_SetReferences End Sub --------------- Thanks for your help… Earl |
![]() |
| Thread Tools | |
| Display Modes | |
| |