Pinecone2007
asked on
Access 2007 Runtime VBA issues
I have developed a mini application in Access 2007 (development machine is running Vista with Office 2007). I have developed custom Ribbons and automated a number of features using VBA functions and sub routines. All routines have error handling built in. I have done my original testing and development using Access 2007 runtime are on my machine
My distribution targets are using Access 2007 runtime, with Office 2003 on XP.
I am getting problems occuring on my target environment that do not show up when I run Access 2007 runtime on my development machine
In my target machines.
1) My ribbons work fine -- apart from the OnAction method which does not appear to be firing the named procedure. I have tried putting in MsgBox statements at the top of the procedure and as far as I can tell, the procedures is not being invoked -- but works fine on my development machine. The procedure does not run, however the Runtime application continues
2) Some of my command button 'Event' VBA procedures are working consistently, however others are failing and seemingly missing the On Error Goto Error_Handler statements that I have included at the top of the procedures. I have tried putting in MsgBox statements at the top of these procedures, but again it appears that the procedure is not being invoked. These failures are causing Runtime to abort with the friendly option of 'Click to close'. Example given in Code Snippets of one routine that is working fine and another that is failing
My initial thought was that VBA was not installed on the target machines, however I have ruled this out since at least some of the VBA procedures are working OK.
I suspect that their is an environment issue here -- I'd appreciate guidance
My distribution targets are using Access 2007 runtime, with Office 2003 on XP.
I am getting problems occuring on my target environment that do not show up when I run Access 2007 runtime on my development machine
In my target machines.
1) My ribbons work fine -- apart from the OnAction method which does not appear to be firing the named procedure. I have tried putting in MsgBox statements at the top of the procedure and as far as I can tell, the procedures is not being invoked -- but works fine on my development machine. The procedure does not run, however the Runtime application continues
2) Some of my command button 'Event' VBA procedures are working consistently, however others are failing and seemingly missing the On Error Goto Error_Handler statements that I have included at the top of the procedures. I have tried putting in MsgBox statements at the top of these procedures, but again it appears that the procedure is not being invoked. These failures are causing Runtime to abort with the friendly option of 'Click to close'. Example given in Code Snippets of one routine that is working fine and another that is failing
My initial thought was that VBA was not installed on the target machines, however I have ruled this out since at least some of the VBA procedures are working OK.
I suspect that their is an environment issue here -- I'd appreciate guidance
'Here is one Subroutine that causes the Runtime on XP to error
Private Sub btnASX2007_DblClick(Cancel As Integer)
On Error GoTo Error_Handler
If (Not IsNull(Me.Code)) Then
Call basASXannouncements(Me.Code, "2007")
End If
Exit_Procedure:
On Error Resume Next
Exit Sub
Error_Handler:
DisplayUnexpectedError Err.Number, Err.Description
Resume Exit_Procedure
Resume
End Sub
'Whilst this seemingly similar sub routine runs fine
Private Sub btnasxpage_Click()
On Error GoTo Error_Handler
Call basASXpage(Me.Code)
Exit_Procedure:
On Error Resume Next
Exit Sub
Error_Handler:
DisplayUnexpectedError Err.Number, Err.Description
Resume Exit_Procedure
Resume
End Sub
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I am far from certain that my references on the Target machines are 100% GOOD, however they do appear to be OK
The Target machines do not have Access installed, so instead I have looked at the references via Excel and what I see appears to be correct for a office 2003 installation
1) Visual Basic for Applications
2) Microsoft Excel 11.0 Object Library
3) OLE Automation
4) Microsoft Office 11.0 Object Library
The Target machines do not have Access installed, so instead I have looked at the references via Excel and what I see appears to be correct for a office 2003 installation
1) Visual Basic for Applications
2) Microsoft Excel 11.0 Object Library
3) OLE Automation
4) Microsoft Office 11.0 Object Library
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Workaround accepted as solution
ASKER
The target machine have 2003 only whilst development has 2007 only so I think my problem lies elsewhere.
But to your observation, mixed environments do appear to create grief sometimes due to mixs ups with the references to Microsoftware Object library and Microsoft Office Library -- which I think are version 12.0 for 2007 and version 11.0 for 2003