ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Dr. Watson error (https://www.excelbanter.com/excel-programming/324037-dr-watson-error.html)

jack

Dr. Watson error
 
Hello all,

I hope that someone will be able to help me with this problem. I have a
heavily coded spreadsheet in xl 97. It's been working fine for over a year
now. Suddenly, it now produces a Dr. Watson error in windows when it reaches
a specific point in the code where it copies a worksheet in the workbook and
pastes it at the end of the tabs. I'm using plain, simple code that as I
say, has been working great for over a year, so I'm very confused at why this
error would suddenly begin after all this time. I hope someone can tell what
I need to do to handle this Dr. Watson error. My code that copies the sheet
is below in case it is helpful in some way.

Sheets(3).Copy After:=Sheets(7)

ps: neither the workbook nor worksheet are protected


Thanks for any help/advice,

-Jack

Tom Ogilvy

Dr. Watson error
 
Look in the VBE in the project explorer and see if you have codenames for
your sheets like

Sheet1111111111111111111111

If you do, the problem is that xl97 appends a digit to the end of the code
name for the copy. When the length reaches around 32 characters, it bombs.

select the sheet, then make the property window visible and change the code
name to something much shorter. do this for any names that have gotten
long.

Attempt this on a copy of your workbook.

--
Regards,
Tom Ogilvy

"Jack" wrote in message
...
Hello all,

I hope that someone will be able to help me with this problem. I have a
heavily coded spreadsheet in xl 97. It's been working fine for over a

year
now. Suddenly, it now produces a Dr. Watson error in windows when it

reaches
a specific point in the code where it copies a worksheet in the workbook

and
pastes it at the end of the tabs. I'm using plain, simple code that as I
say, has been working great for over a year, so I'm very confused at why

this
error would suddenly begin after all this time. I hope someone can tell

what
I need to do to handle this Dr. Watson error. My code that copies the

sheet
is below in case it is helpful in some way.

Sheets(3).Copy After:=Sheets(7)

ps: neither the workbook nor worksheet are protected


Thanks for any help/advice,

-Jack





All times are GMT +1. The time now is 03:55 AM.

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