sashapixie
Board Regular
- Joined
- Aug 29, 2013
- Messages
- 71
- Office Version
- 365
- Platform
- Windows
Hi There
I have the following code set up in my full version of Access 2013.
Private Sub Contract_Number_AfterUpdate()
'Open As the crow flys message box
If MsgBox("Would you like to update the 'as the crow flys' file now?", vbQuestion Or vbYesNo, "Information Update Request!") = vbYes Then
'Open Excel
Dim xlTmp As Excel.Application
Set xlTmp = New Excel.Application
'Open As the crow flys file
xlTmp.Workbooks.Open "Z:\#Accounts\As The Crow Flies\As The Crow Flies.xlsx"
xlTmp.Visible = True
xlTmp.ActiveWindow.WindowState = 2
'Clean up code
Set xlTmp = Nothing
End If
End Sub
I have colleagues who have Access 2013 runtime installed on their machines, when I run this code on their machines I get the following error message and then database promptly closes.
I'm at a loss on how to fix this, any help would be greatly appreciated.
"Execution of this application has stopped due to a run-time error."
"The application can't continue and will be shut down"
I have the following code set up in my full version of Access 2013.
Private Sub Contract_Number_AfterUpdate()
'Open As the crow flys message box
If MsgBox("Would you like to update the 'as the crow flys' file now?", vbQuestion Or vbYesNo, "Information Update Request!") = vbYes Then
'Open Excel
Dim xlTmp As Excel.Application
Set xlTmp = New Excel.Application
'Open As the crow flys file
xlTmp.Workbooks.Open "Z:\#Accounts\As The Crow Flies\As The Crow Flies.xlsx"
xlTmp.Visible = True
xlTmp.ActiveWindow.WindowState = 2
'Clean up code
Set xlTmp = Nothing
End If
End Sub
I have colleagues who have Access 2013 runtime installed on their machines, when I run this code on their machines I get the following error message and then database promptly closes.
I'm at a loss on how to fix this, any help would be greatly appreciated.
"Execution of this application has stopped due to a run-time error."
"The application can't continue and will be shut down"
Last edited: