Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 19th, 2011, 06:03 PM
Registered User
 
Join Date: May 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Cannot get access to the code.

I wrote an application in Excel VBA. On startup, my application shows a menu with control buttons. The application works fine on the computer on which it was written. However on other computers, as soon as Excel starts, an error msg is shown: "Microsoft Excel has encountered a problem and needs to close". The same problem occurs in Excel 2002 and 2007.
How can I stop execution of my application before the error msg is shown? Ctrl+Break doesn’t work. Disabling Macros doesn’t help. How can I get access to the code, to try and make changes?
Thanks.
 
Old May 19th, 2011, 09:07 PM
JP JP is offline
Authorized User
 
Join Date: Apr 2008
Posts: 57
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Put the word "Stop" at the beginning of your code, i.e.


Code:
Private Sub Workbook_Open()
Stop
' rest of your code
End Sub
__________________
Regards,
JP
JP SoftTech
 
Old May 20th, 2011, 01:06 AM
Registered User
 
Join Date: May 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by JP View Post
Put the word "Stop" at the beginning of your code, i.e.


Code:
Private Sub Workbook_Open()
Stop
' rest of your code
End Sub
But I cannot access the code.
 
Old May 20th, 2011, 06:45 AM
JP JP is offline
Authorized User
 
Join Date: Apr 2008
Posts: 57
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Not even on the computer you wrote it on?

You said:

Quote:
The application works fine on the computer on which it was written.
Put "Stop" at the beginning of your code, then put the application on another computer and run it.
__________________
Regards,
JP
JP SoftTech





Similar Threads
Thread Thread Starter Forum Replies Last Post
Why all of my VB code are missing in Access cindyl Access VBA 6 February 7th, 2011 11:10 AM
need help with code- convert to access 2000 marciann BOOK: Beginning Access 2003 VBA 1 June 7th, 2005 02:15 PM
Don't you have ACCESS code for this book? Dango24 BOOK: ASP.NET Website Programming Problem-Design-Solution 1 August 19th, 2004 10:21 PM
Protect ACCESS CODE liviudiaconu Access VBA 1 February 6th, 2004 10:05 AM
Can't connect to access database using C# code... saxitalis Access 1 November 8th, 2003 02:08 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.