Re: Range(0,0).Select ?
- From: "Chip Pearson" <chip@xxxxxxxxxxxx>
- Date: Wed, 14 Dec 2005 11:18:21 -0600
> Range(0, 0).Select
It is bad code. The syntax
Range(x,y)
will fail if x and y are any numbers.
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"Bill Martin" <wylie@xxxxxxxxxxxxx> wrote in message
news:upb0vTMAGHA.3984@xxxxxxxxxxxxxxxxxxxxxxx
>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 Data*** = Active***
> Data***.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
.
- References:
- Range(0,0).Select ?
- From: Bill Martin
- Range(0,0).Select ?
- Prev by Date: Re: Making it not look like excel????
- Next by Date: Change CommandButton Picture
- Previous by thread: Re: Range(0,0).Select ?
- Next by thread: Trouble with Average function
- Index(es):