WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Return boolean as 1 or 0

 
   Home -> Office -> General Protection Fault Errors RSS
Next:  Counting Cells With Condition  
Author Message
Greg

External


Since: Apr 20, 2006
Posts: 169



(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

Thanks
Greg
Back to top
Login to vote
Jerry W. Lewis

External


Since: Mar 08, 2006
Posts: 249



(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
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> General Protection Fault Errors 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
Categories:
 Windows XP
 Windows Vista
 Windows Other
  Office
 Office Other
 Security
 WinRAR
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET