Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I've got a macro on a spreadsheet that launches a form but the form wont
open. It has worked for me in the past. I made some minor changes to the form and the code but now it wont open. When I click on debug here is where it points... Sub Button2_Click() UserForm2.Show this is yellow End Sub Any suggestions? I really appreciate your help!!! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
There is nothing on this line that should cause a problem. Place your cursor
on this line a press F8. This will run your code one line at a time. Keep pressing F8 until the error message appears. I am guessing that the actual error might be in a form intialize or form activate event. Give it a try and let us know how it went... HTH "Audrey" wrote: I've got a macro on a spreadsheet that launches a form but the form wont open. It has worked for me in the past. I made some minor changes to the form and the code but now it wont open. When I click on debug here is where it points... Sub Button2_Click() UserForm2.Show this is yellow End Sub Any suggestions? I really appreciate your help!!! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
When I press F8 it tries to save.
"Jim Thomlinson" wrote: There is nothing on this line that should cause a problem. Place your cursor on this line a press F8. This will run your code one line at a time. Keep pressing F8 until the error message appears. I am guessing that the actual error might be in a form intialize or form activate event. Give it a try and let us know how it went... HTH "Audrey" wrote: I've got a macro on a spreadsheet that launches a form but the form wont open. It has worked for me in the past. I made some minor changes to the form and the code but now it wont open. When I click on debug here is where it points... Sub Button2_Click() UserForm2.Show this is yellow End Sub Any suggestions? I really appreciate your help!!! |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Lets try this from a different angle. In the code window, place your cursor
on the userform2.show line. Hit F9. The line should now be Dark Red. This is a break point. (When we have figured out what is wrong we can remove the break point in the exact same way as we placed it in the first place.) Now go back to excel and press the command button. The code will stop on this break point. Now hit F8. Keep hitting F8 until an error message appears. Let me know how it goes. HTH "Audrey" wrote: When I press F8 it tries to save. "Jim Thomlinson" wrote: There is nothing on this line that should cause a problem. Place your cursor on this line a press F8. This will run your code one line at a time. Keep pressing F8 until the error message appears. I am guessing that the actual error might be in a form intialize or form activate event. Give it a try and let us know how it went... HTH "Audrey" wrote: I've got a macro on a spreadsheet that launches a form but the form wont open. It has worked for me in the past. I made some minor changes to the form and the code but now it wont open. When I click on debug here is where it points... Sub Button2_Click() UserForm2.Show this is yellow End Sub Any suggestions? I really appreciate your help!!! |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Our keyboards must not match. F9 is something else (I have XP). I added a
"watch" and received the following information back... Expression: UserForm2 Value: <Object variable or With block variable not set Type: UserForm2 Context: Module1.Button2_Click "Jim Thomlinson" wrote: Lets try this from a different angle. In the code window, place your cursor on the userform2.show line. Hit F9. The line should now be Dark Red. This is a break point. (When we have figured out what is wrong we can remove the break point in the exact same way as we placed it in the first place.) Now go back to excel and press the command button. The code will stop on this break point. Now hit F8. Keep hitting F8 until an error message appears. Let me know how it goes. HTH "Audrey" wrote: When I press F8 it tries to save. "Jim Thomlinson" wrote: There is nothing on this line that should cause a problem. Place your cursor on this line a press F8. This will run your code one line at a time. Keep pressing F8 until the error message appears. I am guessing that the actual error might be in a form intialize or form activate event. Give it a try and let us know how it went... HTH "Audrey" wrote: I've got a macro on a spreadsheet that launches a form but the form wont open. It has worked for me in the past. I made some minor changes to the form and the code but now it wont open. When I click on debug here is where it points... Sub Button2_Click() UserForm2.Show this is yellow End Sub Any suggestions? I really appreciate your help!!! |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here is a silly question. Do you have a userform2. In the project window you
will see the Excel sheets, the forms and the modules. Under forms is there a UserForm2? "Audrey" wrote: Our keyboards must not match. F9 is something else (I have XP). I added a "watch" and received the following information back... Expression: UserForm2 Value: <Object variable or With block variable not set Type: UserForm2 Context: Module1.Button2_Click "Jim Thomlinson" wrote: Lets try this from a different angle. In the code window, place your cursor on the userform2.show line. Hit F9. The line should now be Dark Red. This is a break point. (When we have figured out what is wrong we can remove the break point in the exact same way as we placed it in the first place.) Now go back to excel and press the command button. The code will stop on this break point. Now hit F8. Keep hitting F8 until an error message appears. Let me know how it goes. HTH "Audrey" wrote: When I press F8 it tries to save. "Jim Thomlinson" wrote: There is nothing on this line that should cause a problem. Place your cursor on this line a press F8. This will run your code one line at a time. Keep pressing F8 until the error message appears. I am guessing that the actual error might be in a form intialize or form activate event. Give it a try and let us know how it went... HTH "Audrey" wrote: I've got a macro on a spreadsheet that launches a form but the form wont open. It has worked for me in the past. I made some minor changes to the form and the code but now it wont open. When I click on debug here is where it points... Sub Button2_Click() UserForm2.Show this is yellow End Sub Any suggestions? I really appreciate your help!!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Run-time error '70': Permission denied | Excel Programming | |||
Run time error 70 permission denied | Excel Programming | |||
Permission Denied Error 70 | Excel Programming | |||
Error "Permission denied" when printing Web Browser control from button on userform, | Excel Programming | |||
Runtime error Permission Denied | Excel Programming |