Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 105
Default Sheets("ROIC").Select Fails

I'm stumped.

First some general background: I've got a spreadsheet that I've used for
months. Today it fails on me for no apparent reason. It's got very little
information in it and only a couple of macros. When it fails, Excel locks up,
sends debug info to Msft and closes Excel. Initially I thought it was my
machine at fault and copied the XLS over to another machine and was surprised to
see it fail the same way there.

The specifics: It is one particular macro that fails which simply copies data
from one sheet to another, reformatting a bit as it goes. After a lot of
putzing around inserting MsgBox statements to help debug, I find that the
program enters ok, and executes a few trivial statements properly, and then
fails at the simple statement:

Sheets("ROIC").Select

Hmmm.... Ok, bypassing a bunch of testing that I did, I find that if I copy the
contents of sheet ROIC to another sheet, and change the "Sheets" statement
accordingly it works ok. It only fails when it tries to select the ROIC sheet,
or tries to read/write to it. Likewise it fails if it tries to select or
read/write from the sheet that is the source of the data. But it works ok if I
copy that data off to a new sheet and work from there.

So then I tried renaming the ROIC sheet to something else and then renaming it
back again to ROIC. No help. Somehow Excel does not seem to recognize that the
two sheets exist anymore despite the fact that the VBA editor recognizes them,
and Excel recognizes the sheets with normal formulas -- just not from VBA.

So I copied the sheets to new ones. Deleted the old ones and then renamed the
new ones back to the old names. Everything works great.

I'm totally lost as to why Excel, even after rebooting 50 times today, just can
not recognize the old sheets.

Does this sound familiar to anyone?

Thanks.

Bill
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Sheets("ROIC").Select Fails

Possibly the sheet was in some way corrupted. You actions have rectified
the problem and in the case of corruption, would be the suggested actions.

--
Regards,
Tom Ogilvy


"Bill Martin" wrote in message
...
I'm stumped.

First some general background: I've got a spreadsheet that I've used for
months. Today it fails on me for no apparent reason. It's got very

little
information in it and only a couple of macros. When it fails, Excel locks

up,
sends debug info to Msft and closes Excel. Initially I thought it was my
machine at fault and copied the XLS over to another machine and was

surprised to
see it fail the same way there.

The specifics: It is one particular macro that fails which simply copies

data
from one sheet to another, reformatting a bit as it goes. After a lot of
putzing around inserting MsgBox statements to help debug, I find that the
program enters ok, and executes a few trivial statements properly, and

then
fails at the simple statement:

Sheets("ROIC").Select

Hmmm.... Ok, bypassing a bunch of testing that I did, I find that if I

copy the
contents of sheet ROIC to another sheet, and change the "Sheets" statement
accordingly it works ok. It only fails when it tries to select the ROIC

sheet,
or tries to read/write to it. Likewise it fails if it tries to select or
read/write from the sheet that is the source of the data. But it works ok

if I
copy that data off to a new sheet and work from there.

So then I tried renaming the ROIC sheet to something else and then

renaming it
back again to ROIC. No help. Somehow Excel does not seem to recognize

that the
two sheets exist anymore despite the fact that the VBA editor recognizes

them,
and Excel recognizes the sheets with normal formulas -- just not from VBA.

So I copied the sheets to new ones. Deleted the old ones and then renamed

the
new ones back to the old names. Everything works great.

I'm totally lost as to why Excel, even after rebooting 50 times today,

just can
not recognize the old sheets.

Does this sound familiar to anyone?

Thanks.

Bill



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 105
Default Sheets("ROIC").Select Fails

Tom Ogilvy wrote:
Possibly the sheet was in some way corrupted. You actions have rectified
the problem and in the case of corruption, would be the suggested actions.

---------------

Not a comforting thought Tom. Possibly none-the-less true.

Bill
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
"Control" plus "click" doesn't allow me to select multiple cells Ken Cooke New Users to Excel 0 September 25th 06 04:46 PM
how to release anchored cell in EXCEL when hitting "esc" fails? L Excel Discussion (Misc queries) 1 April 15th 06 01:03 AM
Questionnaire sheet: Select "yes" or "no," and only one can be selected bpatterson Excel Worksheet Functions 2 April 13th 06 11:04 PM
Using "Cells" to write "Range("A:A,H:H").Select" Trip Ives[_2_] Excel Programming 3 June 5th 04 03:13 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"