ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Opening Forms error with Workbook_open (https://www.excelbanter.com/excel-programming/328107-opening-forms-error-workbook_open.html)

Merlins apprentice

Opening Forms error with Workbook_open
 
Having upgraded my pc to Office 2003 I now get an error message in a
spreadsheet that opens a form from the workbook_open event.
The first error message is: Path/File Access error.
Then another message: Could not find specified object.
The Spreadsheet will then crash.

It's like it tries to run the Open event code before loading up the forms.
Is there some code I should run to ensure the forms are loaded before the
Open code runs.
Has something changed with forms since excel 2000?

( the Load Userform1 line gives the same error as Userform1.show)



Jan Karel Pieterse

Opening Forms error with Workbook_open
 
Hi Merlins,

Having upgraded my pc to Office 2003 I now get an error message in a
spreadsheet that opens a form from the workbook_open event.
The first error message is: Path/File Access error.
Then another message: Could not find specified object.
The Spreadsheet will then crash.


Try moving the code that opens the form to a sub in a normal module and
use the OnTime event in the Workbook_Open event to fire that (new) sub.

I would also recommend cleaning your project using Rob Bovey's code
cleaner: www.appspro.com

Regards,

Jan Karel Pieterse
Excel MVP
http://www.jkp-ads.com



All times are GMT +1. The time now is 11:57 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com