Form Names
I have a form named frmAbout with a capital A. In my code I have
frmabout.show, or frmabout.hide. They have small a. When I change to capital A it changes back to small a. If I run the code I get an error message "Object Variable or With Block Variable Not Set." If I change the form name in Properties to frmabout with small a and re run the code, I get the same error. 2 questions: What causes the A to change? Is the error related to the 'A' or could there be some other problem with my code. |
Form Names
place this:
OPTION EXPLICIT at the top of your code module ... it will help enforce correct variable name spelling "Doug" wrote in message ... I have a form named frmAbout with a capital A. In my code I have frmabout.show, or frmabout.hide. They have small a. When I change to capital A it changes back to small a. If I run the code I get an error message "Object Variable or With Block Variable Not Set." If I change the form name in Properties to frmabout with small a and re run the code, I get the same error. 2 questions: What causes the A to change? Is the error related to the 'A' or could there be some other problem with my code. |
Form Names
I'm not sure where you mean to place it. I have 'Sub Workbook_Open(), if I
place it above, title changes to(General) (Declarations). If I place it below text changes to blue. Either way, the A always changes to a small a. Thanks, Doug "Patrick Molloy" wrote: place this: OPTION EXPLICIT at the top of your code module ... it will help enforce correct variable name spelling "Doug" wrote in message ... I have a form named frmAbout with a capital A. In my code I have frmabout.show, or frmabout.hide. They have small a. When I change to capital A it changes back to small a. If I run the code I get an error message "Object Variable or With Block Variable Not Set." If I change the form name in Properties to frmabout with small a and re run the code, I get the same error. 2 questions: What causes the A to change? Is the error related to the 'A' or could there be some other problem with my code. |
All times are GMT +1. The time now is 02:11 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com