@ in msgbox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hiya

I have a message box that uses 3 @ symbols to help in its formatting. This works a treat

Problem is that now I have a such a message box that needs to display an email address within it - it takes the @ sympbol within the email address as a formatting break so spits up the email address. The bottom line is also not shown as anything after the 3rd @ symbol is disgarded

Does anybody know how I can dodge this? the email address is held in a string variable - would re-formatting it so it reads it as something else other than a string be an option - can the @ symbol be read as anthing other than a string?

Karen
 
Hi Karen,

Try using: VBA.Chr(64)

For example: VBA.MsgBox "someone" & VBA.Chr(64) & "hotmail.com"

Jamie
www.jamiessoftware.tk

Karen said:
Hiya,

I have a message box that uses 3 @ symbols to help in its formatting. This works a treat.

Problem is that now I have a such a message box that needs to display an
email address within it - it takes the @ sympbol within the email address as
a formatting break so spits up the email address. The bottom line is also
not shown as anything after the 3rd @ symbol is disgarded.
Does anybody know how I can dodge this? the email address is held in a
string variable - would re-formatting it so it reads it as something else
other than a string be an option - can the @ symbol be read as anthing other
than a string??
 
Thanks for the suggestion Jamie, unfortnately this still treats the @ symbol as if it were there for formatting purposes. (I would also rather leave the whole email address as 1 since it is stored in a single variable)

Any other ideas

----- Jamie wrote: ----

Hi Karen

Try using: VBA.Chr(64

For example: VBA.MsgBox "someone" & VBA.Chr(64) & "hotmail.com

Jami
www.jamiessoftware.t

Karen said:
email address within it - it takes the @ sympbol within the email address a
a formatting break so spits up the email address. The bottom line is als
not shown as anything after the 3rd @ symbol is disgardedstring variable - would re-formatting it so it reads it as something els
other than a string be an option - can the @ symbol be read as anthing othe
than a string?
 
Karen said:
I have a message box that uses 3 @ symbols to help in its formatting. This works a treat.

Problem is that now I have a such a message box that needs to display an email address within it - it takes the @ sympbol within the email address as a formatting break so spits up the email address. The bottom line is also not shown as anything after the 3rd @ symbol is disgarded.

Does anybody know how I can dodge this? the email address is held in a string variable - would re-formatting it so it reads it as something else other than a string be an option - can the @ symbol be read as anthing other than a string??


FYI - that feature was dropped in A2K.

AFAIK, there is no way around this issue with the MsgBox
function.

You do have the choice of not using MsgBox and creating your
own function that open your own form to display messages.
 
Thanks

Bit of a bummer... I'll leave out all the formatting. Why did they get rid of it after 97? I didn't think 97 was better in any way at all!

K x
 
They took it out because it was Office specific, and not
windows specific. You can still get around by using the
Eval function.

Eval("msgbox ('Test@1@2')")

As far as what you want to do, you will need to create a
custom Message Box function.

Chris
-----Original Message-----
Thanks.

Bit of a bummer... I'll leave out all the formatting.
Why did they get rid of it after 97? I didn't think 97
was better in any way at all!!
 
Does anybody know how I can dodge this?

I guess it would take you at least - ooh -- three minutes to create a
custom dialog box to display whatever you like, however you like, with any
icons or colours you care to offer.

B Wishes


Tim F
 
Back
Top