Problem in compiling code containing "$" char

  • Thread starter Thread starter Alain79
  • Start date Start date
A

Alain79

In a big Excel xla application I have some functions that goal is just to
detect if the character "§" is not in a string inside a specifc cell - up to
now no problem...

This .xla Addin application is distributed on several countries - most of PC
running the application are
=> either Win2000 US plus Office 2000 US
=> or Win 2000 US plus office 2003 US
=> or Win XP US plus Office 2003 US

Problem description: on some machine (only a few), the xla application
cannot be compiled, in fact if you open the microsoft visual basic editor,
you can see that the "§" character has been replaced by a "?" that produces
the compiler problem...

Have you an idea for the reason of this behaviour?
We have already made an analysis of the code page conversion table of the PC
that have the problem and have seen that its content was identical to
another PC without any problem...

Thanks if you can help
Alain
 
Would it help to search for CHR(167) instead of actually identifying the "§"
symbol?
 
Why not - good idea indeed
But have you an idea about why one specific machine present this strnge
behaviour
Because as long as I do not understand the reason I can have to face the
same problem with other characters such as with "é"
Thanks for your suggestion
Alain
 
Sorry Alain, I do not know -- I will eagerly watch the rest of this thread
unfold as experts respond, which I know they will. This is the most
responsive forum in the known universe... and any unknown universes probably
couldn't match it either :-)

Bill
 
I don't have a guess, but maybe a workaround...

Use chr(167) instead of §.
 
whoops. Didn't see the existing replies.
In a big Excel xla application I have some functions that goal is just to
detect if the character "§" is not in a string inside a specifc cell - up to
now no problem...

This .xla Addin application is distributed on several countries - most of PC
running the application are
=> either Win2000 US plus Office 2000 US
=> or Win 2000 US plus office 2003 US
=> or Win XP US plus Office 2003 US

Problem description: on some machine (only a few), the xla application
cannot be compiled, in fact if you open the microsoft visual basic editor,
you can see that the "§" character has been replaced by a "?" that produces
the compiler problem...

Have you an idea for the reason of this behaviour?
We have already made an analysis of the code page conversion table of the PC
that have the problem and have seen that its content was identical to
another PC without any problem...

Thanks if you can help
Alain
 
You and someone else suggested me to use CHR(167)
I think my problem can be coming on how the computer "understand" the
extended ASCII Codes
If in this text I enter <ALT> 167 the character that is displayed is º and
not §
I have not yet found which combination on my own PC gives the character §
At the moment I am looking at the internet site
(http://www.lookuptables.com/) that present the supposed most popular usage
of the Extended ASCII codes... I have tryed most of them but no one
correspond to the char § while all are clearly provide me with the expected
Character...
I have the real feeling it should come form taht point - Have you an idea on
how to control/access the extended ASCII Codes used in the MS VBA Editor -
Is it directly under the control of vba or coming from the Regional
Parameters or perhaps both?

Alain (France)
 
Hi Alain79

Have you tried <Alt> 0167, on my PC (Excel 2002 Enlish version) I get §
 
Yes you're right
I was trying ALT 167 that gives º while ALT 0167 really give §
Thanks for that...

I can effectively change my code that way and test the result...
but this does not prevent me from having to face the same problem with some
other Char such as with the french "é" and it is not that comfortable to
change this letter everywhere it is used by ALT 0XXX especially when it is
inside a name...
I have started to analyse some ASCII Tables above 128 and the one I have got
supposed to be the most used one does not have the § !!!
If you know more about that, thanks
Alain

alf bryn said:
Hi Alain79

Have you tried <Alt> 0167, on my PC (Excel 2002 Enlish version) I get §
 
I use Excel (Word will also do) to find the ASCII code.

Goto "Insert" -> "Symbol" in the "box" with the all the symbols you will
also find the ASCII code for the symbol you select.

Try to enter this ASCII code in a Cell. If it works fine, if not I try
entering a 0 first and then the numbers.

Alain79 said:
Yes you're right
I was trying ALT 167 that gives º while ALT 0167 really give §
Thanks for that...

I can effectively change my code that way and test the result...
but this does not prevent me from having to face the same problem with
some
other Char such as with the french "é" and it is not that comfortable to
change this letter everywhere it is used by ALT 0XXX especially when it is
inside a name...
I have started to analyse some ASCII Tables above 128 and the one I have
got
supposed to be the most used one does not have the § !!!
If you know more about that, thanks
Alain
 
In the immediate window, type:

?ASC("§")

On my machine it says 167
 
It sounds as though you have a mismatch between the various keyboard
layouts on your machine and the code pages in use.

Are you using a french keyboard ? What keyboards are the target
machines using ?

Set up your machine in the same was as one of the machines that is
failing and see what happens.

Regards

Rich
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top