Execution Error

Execution Error

Anonymous
Not applicable
877 Views
7 Replies
Message 1 of 8

Execution Error

Anonymous
Not applicable
I've got a VBA app that runs great for me. It is on the network for all of our users to use. Sometimes they will get an "execution error" when begining this routine. I have searched through the newsgroup for answers but found none. I have no End statements to end the app, just unload.me. Any other ideas?

This doesn't happen all of the time, just some of the time and is really frustrating.
0 Likes
878 Views
7 Replies
Replies (7)
Message 2 of 8

Anonymous
Not applicable
every now and then we get that here, I've never nailed it down to a repeatable cause but here's our fix: appload, ok sounds weird, but just running that command seems to run some kind of check to make sure anything which should be loaded actually is (our main program dvb file is in the start up suite) HTH, Kevin "tsigwing" wrote in message news:[email protected]... > I've got a VBA app that runs great for me. It is on the network for all of our users to use. Sometimes they will get an "execution error" when begining this routine. I have searched through the newsgroup for answers but found none. I have no End statements to end the app, just unload.me. Any other ideas? > > This doesn't happen all of the time, just some of the time and is really frustrating.
0 Likes
Message 3 of 8

Anonymous
Not applicable
Any idea why the following causes an automation error: Public Sub Start() frmDrawingSetUp.Show End Sub All it does is launch a user form. Nothing complicated or mysterious. "tsigwing" wrote in message news:[email protected]... > I've got a VBA app that runs great for me. It is on the network for all of our users to use. Sometimes they will get an "execution error" when begining this routine. I have searched through the newsgroup for answers but found none. I have no End statements to end the app, just unload.me. Any other ideas? > > This doesn't happen all of the time, just some of the time and is really frustrating.
0 Likes
Message 4 of 8

Anonymous
Not applicable
If a sub in the form has an unhandled error, then it bubbles up to the calling sub. Set a breakpoint and step through the code to find the unhandled error. -- ---- Ed ---- "oreois" wrote in message news:408e7db0$1_1@newsprd01... Any idea why the following causes an automation error: Public Sub Start() frmDrawingSetUp.Show End Sub All it does is launch a user form. Nothing complicated or mysterious. "tsigwing" wrote in message news:[email protected]... > I've got a VBA app that runs great for me. It is on the network for all of our users to use. Sometimes they will get an "execution error" when begining this routine. I have searched through the newsgroup for answers but found none. I have no End statements to end the app, just unload.me. Any other ideas? > > This doesn't happen all of the time, just some of the time and is really frustrating.
0 Likes
Message 5 of 8

Anonymous
Not applicable
It doesn't get that far. If I step through I immediately get the error on the first line Public Sub Start() "Ed Jobe" wrote in message news:408e7ff1$1_1@newsprd01... If a sub in the form has an unhandled error, then it bubbles up to the calling sub. Set a breakpoint and step through the code to find the unhandled error. -- ---- Ed ---- "oreois" wrote in message news:408e7db0$1_1@newsprd01... Any idea why the following causes an automation error: Public Sub Start() frmDrawingSetUp.Show End Sub All it does is launch a user form. Nothing complicated or mysterious. "tsigwing" wrote in message news:[email protected]... > I've got a VBA app that runs great for me. It is on the network for all of our users to use. Sometimes they will get an "execution error" when begining this routine. I have searched through the newsgroup for answers but found none. I have no End statements to end the app, just unload.me. Any other ideas? > > This doesn't happen all of the time, just some of the time and is really frustrating.
0 Likes
Message 6 of 8

Anonymous
Not applicable
Are you using Step Into or Step Over? You should be using Step Into. Does the project compile? Debug>Compile. Is the form name spelled right? Is it recognized by vba? If so you should be able to delete .Show and retype the period and Intellisense would display the props/methods. These are a few of the tests you could perform. -- ---- Ed ---- "oreois" wrote in message news:408e8068_2@newsprd01... It doesn't get that far. If I step through I immediately get the error on the first line Public Sub Start() "Ed Jobe" wrote in message news:408e7ff1$1_1@newsprd01... If a sub in the form has an unhandled error, then it bubbles up to the calling sub. Set a breakpoint and step through the code to find the unhandled error. -- ---- Ed ---- "oreois" wrote in message news:408e7db0$1_1@newsprd01... Any idea why the following causes an automation error: Public Sub Start() frmDrawingSetUp.Show End Sub All it does is launch a user form. Nothing complicated or mysterious. "tsigwing" wrote in message news:[email protected]... > I've got a VBA app that runs great for me. It is on the network for all of our users to use. Sometimes they will get an "execution error" when begining this routine. I have searched through the newsgroup for answers but found none. I have no End statements to end the app, just unload.me. Any other ideas? > > This doesn't happen all of the time, just some of the time and is really frustrating.
0 Likes
Message 7 of 8

Anonymous
Not applicable
Most of the time it works fine. I never get this error, sometimes other users get this error. It is located on a network server that only I have write permissions to. It really is annoying. "Ed Jobe" wrote in message news:408e8262$1_1@newsprd01... Are you using Step Into or Step Over? You should be using Step Into. Does the project compile? Debug>Compile. Is the form name spelled right? Is it recognized by vba? If so you should be able to delete .Show and retype the period and Intellisense would display the props/methods. These are a few of the tests you could perform. -- ---- Ed ---- "oreois" wrote in message news:408e8068_2@newsprd01... It doesn't get that far. If I step through I immediately get the error on the first line Public Sub Start() "Ed Jobe" wrote in message news:408e7ff1$1_1@newsprd01... If a sub in the form has an unhandled error, then it bubbles up to the calling sub. Set a breakpoint and step through the code to find the unhandled error. -- ---- Ed ---- "oreois" wrote in message news:408e7db0$1_1@newsprd01... Any idea why the following causes an automation error: Public Sub Start() frmDrawingSetUp.Show End Sub All it does is launch a user form. Nothing complicated or mysterious. "tsigwing" wrote in message news:[email protected]... > I've got a VBA app that runs great for me. It is on the network for all of our users to use. Sometimes they will get an "execution error" when begining this routine. I have searched through the newsgroup for answers but found none. I have no End statements to end the app, just unload.me. Any other ideas? > > This doesn't happen all of the time, just some of the time and is really frustrating.
0 Likes
Message 8 of 8

Anonymous
Not applicable
Then you need to go to your form and add error handling so that the form handles the error and you don't get a big ? when the error bubbles back up to the calling sub. Below is a sample sub with typical error handling. Note how I use the title argument of the MsgBox function to provide information as to the source of the error. Sub HandleErrorTest() On Error GoTo Err_Control 'do your stuff here 'If my code wants to trap an application specific error, 'I will raise an error here with: 'Err.Raise vbObjectError, "HandleErrorTest", "Application Specific Error" Exit_Here: Exit Sub Err_Control: Select Case Err.Number 'Add your Case selections here Case Is = vbObjectError + 1000 MsgBox Err.Number & ", " & Err.Description, , Err.Source Resume Exit_Here Case Else MsgBox Err.Number & ", " & Err.Description, , "HandleErrorTest" Err.Clear Resume Exit_Here End Select End Sub -- ---- Ed ---- "oreois" wrote in message news:408ef99d$1_2@newsprd01... Most of the time it works fine. I never get this error, sometimes other users get this error. It is located on a network server that only I have write permissions to. It really is annoying. "Ed Jobe" wrote in message news:408e8262$1_1@newsprd01... Are you using Step Into or Step Over? You should be using Step Into. Does the project compile? Debug>Compile. Is the form name spelled right? Is it recognized by vba? If so you should be able to delete .Show and retype the period and Intellisense would display the props/methods. These are a few of the tests you could perform. -- ---- Ed ---- "oreois" wrote in message news:408e8068_2@newsprd01... It doesn't get that far. If I step through I immediately get the error on the first line Public Sub Start() "Ed Jobe" wrote in message news:408e7ff1$1_1@newsprd01... If a sub in the form has an unhandled error, then it bubbles up to the calling sub. Set a breakpoint and step through the code to find the unhandled error. -- ---- Ed ---- "oreois" wrote in message news:408e7db0$1_1@newsprd01... Any idea why the following causes an automation error: Public Sub Start() frmDrawingSetUp.Show End Sub All it does is launch a user form. Nothing complicated or mysterious. "tsigwing" wrote in message news:[email protected]... > I've got a VBA app that runs great for me. It is on the network for all of our users to use. Sometimes they will get an "execution error" when begining this routine. I have searched through the newsgroup for answers but found none. I have no End statements to end the app, just unload.me. Any other ideas? > > This doesn't happen all of the time, just some of the time and is really frustrating.
0 Likes