MsgBox + Less than or equal to symbol

Solved
issan -  
 issan -
Hello,

I created a message box that prevents saving the file if a condition is not met.

The message of the MsgBox is: " ..... the Total hours must be ≤ 24..."

My problem is that I can't insert the symbol " ≤ " in VBA and thus in the message box.
Even when I copy/paste, it pastes a " ? ", strange....

How can I do this?

Thank you for your help.

Issan
Configuration: Windows XP Internet Explorer 6.0

9 answers

issan
 
Hello,

I found the code for this symbol in UTF-8 Unicode online, but I'm having trouble...

Kilian, when you write (&hf3) what kind of coding is that? If I type (0243) I get the same thing (that is, an o with an accent).

See you and thanks ;)
0
issan
 
Hi Xavstarblues,

thank you for all this information.

I also tried the method from the first link you sent, but it doesn't work either.

I think I'm going to have to resign myself to finding another way to achieve what I wanted...
like changing the text in the message box, or I saw that in a text box of a user form, you can just copy and paste this symbol...

Now I just need to figure out how to put all this in place.

In any case, thank you for trying!

Issan :)
0
issan
 
Hello,

Lermite222, I don't understand when you say that it depends on the font used. In VBA when we code, don't we have a choice of the font?!! If you could be more precise.

Anyway, thank you, I think I've understood that the simple thing I want to do doesn't seem possible... too bad...

Thanks everyone!

Issan
0
lermite222 Posted messages 9042 Status Contributor 1 199
 
Hello,
the font used has nothing to do with the IDE where you only enter code but rather with the font used by the support where you want to write. For example, in a textBox, you have the ability to modify its display font, but I only found one font that has that character.
A+
Edit, I had lost sight of the fact that you wanted this in MsgBox, solution... Make your message with a UF and labels where you can change the font.
--
Experience teaches more surely than advice. (André Gide)
If you hit a pot and it sounds hollow, it's not necessarily the pot that's empty. ;-) (Confucius)
-1
issan
 
Hi,

indeed, my initial idea was a msgbox...the simplest solution, or so I thought... lol!

So I switched to creating a userform. And it's true that in this case I have no problem inserting this symbol by just copying/pasting, and moreover, the font of my user form is Tahoma...

thanks again! :)

Issan
0
Xavstarblues Posted messages 10585 Registration date   Status Contributor Last intervention   1 858
 
=

He interprets it as less than or equal to (or it’s <=)
--
Thank you for reading the charter (above the list of forums). Please mark your topics as resolved.
"Man is a piece of garbage, he gets used to everything." (F.D)
-1
issan
 
Hi,

yes, to code you need to do as you said, but what I really want is the symbol.

I tried to put <= in the string, unfortunately it shows up as is (i.e., <=) in the message box.

yet in Excel, if I go to insert/symbol, I find it, but apparently VBA doesn't accept it.


thank you anyway

Issan
0
Xavstarblues Posted messages 10585 Registration date   Status Contributor Last intervention   1 858 > issan
 
I'm sorry, I misunderstood

--
Thank you for reading the charter (on the right side of the screen). Please mark your topics as resolved.
"Man is garbage, he gets used to everything." (F.D)
-1
kilian Posted messages 8675 Registration date   Status Moderator Last intervention   1 526
 
And like that?

" ..... the Total of hours must be " & chr(&hf3) & " 24..."

--
So that's how I'm acting silly, huh?
-1
kilian Posted messages 8675 Registration date   Status Moderator Last intervention   1 526
 
Oh no, damn, I think we'll have to use a trick, like a UTF-8 character or something like that.
--
So that's how I'm acting the fool, huh?
-1
Xavstarblues Posted messages 10585 Registration date   Status Contributor Last intervention   1 858
 
Hello
I found the explanation
https://support.microsoft.com/fr-fr/help/185190

there is a method given in the link but it doesn't work for me (office XP SP3)

otherwise I found this
less-than-or-equal sign A3 ≤ --> ≤

here=>http://www.table-ascii.com/

Some info too

""""""""""""""""""""""""
hi,

0 to 127 = ascii
128 to 255 = extended ascii
chr(X) ok

above that is unicode -> chrW(X) but the default controls do not accept displaying it.
you have to go through Form2.0 controls which are not redistributable (Kro$oft protected license)

now you have to make your own user controls... (good luck^^)
""""""""""""""""""""""""""""""""
--
Thank you for reading the charter (above the forum list). Thank you for marking your topics as resolved.
"Man is trash, he gets used to everything." (F.D)
-1
Xavstarblues Posted messages 10585 Registration date   Status Contributor Last intervention   1 858
 
ou sinon, je ne sais pas si c'est possible mais mettre le caractère "<" et le souligner
--
Merci de lire la charte (à droite de l'ecran). Merci de mettre vos sujet en résolu.
"L’homme est une ordure, il s’habitue à tout." (F.D)
-1
lermite222 Posted messages 9042 Status Contributor 1 199
 
Hello,
It's not possible to display what you want, it depends on the font used. Only the
<Courier New> font has this character.
A+
--
Experience teaches more surely than advice. (André Gide)
If you bump into a pot and it sounds hollow, it's not necessarily the pot that's empty. ;-)(Confucius)
-1