ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Workbook_open procedure issue when two spreadsheets are opened (https://www.excelbanter.com/excel-programming/358244-workbook_open-procedure-issue-when-two-spreadsheets-opened.html)

Gardfd

Workbook_open procedure issue when two spreadsheets are opened
 
I have a spreadsheet that launches a splashscreen when opened, after
specified time, the splashscreen closes and launches a form requiring user
level selection and password requirements. All works fine when this is the
only spreadsheet being opened, lets call it spreadsheet 1.

The issue is when a second spreadsheet is being opened at the same time, I
get a script error. I think the issue is because the second spreadsheet,
lets call it spreadsheet 2, is now the active workbook and the code of course
is not applicable to spreadsheet 2.

Any thoughts how to get around this,

Thanks

Doug Glancy

Workbook_open procedure issue when two spreadsheets are opened
 
Try using ThisWorkbook instead of Activeworkbook?

hth,

Doug

"Gardfd" wrote in message
...
I have a spreadsheet that launches a splashscreen when opened, after
specified time, the splashscreen closes and launches a form requiring user
level selection and password requirements. All works fine when this is
the
only spreadsheet being opened, lets call it spreadsheet 1.

The issue is when a second spreadsheet is being opened at the same time, I
get a script error. I think the issue is because the second spreadsheet,
lets call it spreadsheet 2, is now the active workbook and the code of
course
is not applicable to spreadsheet 2.

Any thoughts how to get around this,

Thanks




Tom Ogilvy

Workbook_open procedure issue when two spreadsheets are opened
 
Use ThisWorkbook rather than ActiveWorkbook in your references.

--
Regards,
Tom Ogilvy


"Gardfd" wrote:

I have a spreadsheet that launches a splashscreen when opened, after
specified time, the splashscreen closes and launches a form requiring user
level selection and password requirements. All works fine when this is the
only spreadsheet being opened, lets call it spreadsheet 1.

The issue is when a second spreadsheet is being opened at the same time, I
get a script error. I think the issue is because the second spreadsheet,
lets call it spreadsheet 2, is now the active workbook and the code of course
is not applicable to spreadsheet 2.

Any thoughts how to get around this,

Thanks



All times are GMT +1. The time now is 11:36 PM.

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