View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
RB Smissaert RB Smissaert is offline
external usenet poster
 
Posts: 2,452
Default Range(0,0).Select ?

These 2 statements can work:

Range(Cells(1), Cells(1)).Select

Cells(1, 1).Select

But I don't think Range(0, 0).Select can ever work.

Maybe show all the code.


RBS




"Bill Martin" wrote in message
...
I have a macro I inherited with the code fragment below. I find that if I
comment out the "on error" statement, the program fails at the line
"Range(0,0).Select" with the Run-time error '1004': Method 'Range' of
object
'_Global' failed.

Excel seems to think the Range line causes a error, yet if I comment out
the
Range line, the program fails to work so it is apparently doing
*something*.
The error handler simply says Resume Next so it's not doing anything
obvious (to
me anyhow).

On Error GoTo ErrorHandler
... (many lines of code) ...
Set DataSheet = ActiveSheet
DataSheet.Unprotect
Range(0, 0).Select

Can someone explain to me the logic of this fragment? I've been
unsuccessful
with the Excel Help system and with my normal reference books. I would
have
thought it was just the equivalent of Range("A1").select, but apparently
not.

Thanks...

Bill