(Msg. 1) Posted: Thu Aug 21, 2008 10:06 am
Post subject: Return boolean as 1 or 0 Archived from groups: microsoft>public>excel>crashesgpfs (more info?)
hi,
how i convert a boolean variable "Header" into numerical value to work in
the following line:
Sheets(wsFrom).UsedRange.Offset(1 - Header, 0).Copy
(Msg. 2) Posted: Thu Aug 21, 2008 12:32 pm
Post subject: RE: Return boolean as 1 or 0 [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
Arithmetic (such as 1 - Header) coerces a boolean value into a number.
However, in VBA, True coerces to -1, not 1, so you may need 1 + Header.
Jerry
"Greg" wrote:
> hi,
>
> how i convert a boolean variable "Header" into numerical value to work in
> the following line:
> Sheets(wsFrom).UsedRange.Offset(1 - Header, 0).Copy
>
> Thanks
> Greg
All times are: Eastern Time (US & Canada) (change)
Page 1 of 1
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum