Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This is very strange. I ran a macro in a worksheet that does quite of
few routines, and has worked good up until now. Today, I ran it, and at the end of it all, it now opens up the VBA Editor, and shows all the UserForms, and Modules. I have never had it do this. I don't even know how to write the code for that. I noticed all this when I ran the macro today, and at the very end of all the routines, it asked for the PW to open up the editor. (I've had a PW on it since I started building macros in it.) I removed the PW, opened the workbook up again, and ran the macro. It still went to the editor, and opened up all the forms, modules, etc. Any ideas why this is happening? Thanks, J.O. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
My guess is that you are hitting an error and the program is breaking on the
error. Does an error message pop up or not. Check your VBA editor Under tools - Options - General it should be set to Break on Unhandled Errors. The other thing to do is to open the Project and make sure the code compiles Debug - Compile -- HTH... Jim Thomlinson "excelnut1954" wrote: This is very strange. I ran a macro in a worksheet that does quite of few routines, and has worked good up until now. Today, I ran it, and at the end of it all, it now opens up the VBA Editor, and shows all the UserForms, and Modules. I have never had it do this. I don't even know how to write the code for that. I noticed all this when I ran the macro today, and at the very end of all the routines, it asked for the PW to open up the editor. (I've had a PW on it since I started building macros in it.) I removed the PW, opened the workbook up again, and ran the macro. It still went to the editor, and opened up all the forms, modules, etc. Any ideas why this is happening? Thanks, J.O. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Well, I checked, and the settings in Tools are ok.
I run the Compile Worksheet, and it gives errors in modules that I'm working on. There are lots of code in here that doesn't work right. But, I'm not using these subs. There just there to work on (saving the file to another name when testing). So, the Compile thing doesn't do much good for me. Also, there is no error message. All the routines seem to work ok. Everything does what its suppose to. I'll have to go back and find the last file that worked ok. These are renamed each day. If you have other ideas, I would appreciate it. Thanks, J.O. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"Jim Thomlinson"
wrote - Options - General it should be set to Break on Unhandled Errors. Actually, it is better to set the Error Trapping option to 'Break in Class Module', so that if there is an error in a class module (or ThisWorkbook or a sheet module or form), you'll break in the class module itself, rather than the call to the class module's methods. To illustrate, just put Public Sub X() Debug.Print 1 / 0 End Sub in ThisWorkbook. Then, from a general module, run Sub AAA() ThisWorkbook.X End Sub Change the Error Trapping options between 'Break On Handled Errors' and 'Break In Class Module' to see where the code breaks. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Jim Thomlinson" wrote in message ... My guess is that you are hitting an error and the program is breaking on the error. Does an error message pop up or not. Check your VBA editor Under tools - Options - General it should be set to Break on Unhandled Errors. The other thing to do is to open the Project and make sure the code compiles Debug - Compile -- HTH... Jim Thomlinson "excelnut1954" wrote: This is very strange. I ran a macro in a worksheet that does quite of few routines, and has worked good up until now. Today, I ran it, and at the end of it all, it now opens up the VBA Editor, and shows all the UserForms, and Modules. I have never had it do this. I don't even know how to write the code for that. I noticed all this when I ran the macro today, and at the very end of all the routines, it asked for the PW to open up the editor. (I've had a PW on it since I started building macros in it.) I removed the PW, opened the workbook up again, and ran the macro. It still went to the editor, and opened up all the forms, modules, etc. Any ideas why this is happening? Thanks, J.O. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Visual Basic Editor opens bi itself | Excel Discussion (Misc queries) | |||
VB editor opens by magic | Excel Programming | |||
Computer Lock opens up VB editor | Excel Programming | |||
macro not working as intended | Excel Programming | |||
VBA Editor opens by itself? | Excel Programming |