Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Boolean in VBA are returned in local language

Hi,

My VBA script reads some values from cells and sends them to a
webservice. I just realized that using a German Excel e.g.
cell.Font.Strikethrough is returned as Wahr/Falsch instead of
True/False. I tried following code snippet I found online but
unfortunately didn't help either:
......
Dim bolVal As Variant
bolVal = cell.Font.Strkethrough
If CStr(bolVal ) = "False" Then ' Unfortunately this didn't help.
........

Has anybody an idea how to convert this from any language to
True/False?

Reto

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default Boolean in VBA are returned in local language

If Not CStr(bolVal) then


--
Cheers
Nigel



wrote in message
oups.com...
Hi,

My VBA script reads some values from cells and sends them to a
webservice. I just realized that using a German Excel e.g.
cell.Font.Strikethrough is returned as Wahr/Falsch instead of
True/False. I tried following code snippet I found online but
unfortunately didn't help either:
.....
Dim bolVal As Variant
bolVal = cell.Font.Strkethrough
If CStr(bolVal ) = "False" Then ' Unfortunately this didn't help.
.......

Has anybody an idea how to convert this from any language to
True/False?

Reto



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default Boolean in VBA are returned in local language

Sorry forgot to remove the Cstr conversion.........try this

If Not bolVal Then

--
Cheers
Nigel



"Nigel" wrote in message
...
If Not CStr(bolVal) then


--
Cheers
Nigel



wrote in message
oups.com...
Hi,

My VBA script reads some values from cells and sends them to a
webservice. I just realized that using a German Excel e.g.
cell.Font.Strikethrough is returned as Wahr/Falsch instead of
True/False. I tried following code snippet I found online but
unfortunately didn't help either:
.....
Dim bolVal As Variant
bolVal = cell.Font.Strkethrough
If CStr(bolVal ) = "False" Then ' Unfortunately this didn't help.
.......

Has anybody an idea how to convert this from any language to
True/False?

Reto





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Boolean in VBA are returned in local language

Why not test the boolean directly

Why not test the Boolean directly

Dim bolVal As Variant
bolVal = cell.Font.Strkethrough
If bolVal = FALSE Then


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

wrote in message
oups.com...
Hi,

My VBA script reads some values from cells and sends them to a
webservice. I just realized that using a German Excel e.g.
cell.Font.Strikethrough is returned as Wahr/Falsch instead of
True/False. I tried following code snippet I found online but
unfortunately didn't help either:
.....
Dim bolVal As Variant
bolVal = cell.Font.Strkethrough
If CStr(bolVal ) = "False" Then ' Unfortunately this didn't help.
.......

Has anybody an idea how to convert this from any language to
True/False?

Reto



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Boolean in VBA are returned in local language

Thanks both of you. That helped.

Regards,
Reto
Bob Phillips wrote:
Why not test the boolean directly

Why not test the Boolean directly

Dim bolVal As Variant
bolVal = cell.Font.Strkethrough
If bolVal = FALSE Then


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

wrote in message
oups.com...
Hi,

My VBA script reads some values from cells and sends them to a
webservice. I just realized that using a German Excel e.g.
cell.Font.Strikethrough is returned as Wahr/Falsch instead of
True/False. I tried following code snippet I found online but
unfortunately didn't help either:
.....
Dim bolVal As Variant
bolVal = cell.Font.Strkethrough
If CStr(bolVal ) = "False" Then ' Unfortunately this didn't help.
.......

Has anybody an idea how to convert this from any language to
True/False?

Reto


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
How to change German language data into Eglish Language in a colum Execel work sheet language problems Excel Discussion (Misc queries) 1 October 29th 07 09:59 PM
language support in excel sheet using a third party language tool seema Excel Worksheet Functions 0 March 13th 06 06:06 AM
Language of the local PC Patrick Fredin Excel Programming 1 June 7th 05 03:55 PM
How to change the excel format from language to language? zee Excel Discussion (Misc queries) 2 January 30th 05 06:51 PM
Reference styles and local/non-local formulae - international problems. Alan Howells[_2_] Excel Programming 2 February 24th 04 09:52 AM


All times are GMT +1. The time now is 06:19 PM.

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"