How to display @ using Msgbox

V

Vensia

Dear all,

I have a command like below :

Msgbox "Please call (e-mail address removed)"

In Win 98, it run fine.
But in Win XP, the message is displayed in two lines.
How do I solve it ?
Thx.

Vensia
 
J

Jerry Whittle

Strange. I just did the following on Win XP Profesional and Access 2003:

Sub sTwoAts()
MsgBox "Please call (e-mail address removed)"
End Sub

It worked properly. Where are you running this code and what else is going
on?
 
A

aaron.kempf

I'd try replacign a single @ with a double

in the odl days; we used to be able to use @ to BOLD within a
messagbox; or something along those lines
 
P

Paul Shapiro

I forget which version, but some time ago Access introduced the '@' symbol
as a msgbox formatting-separation command. I think the text before the 1st @
became bold. The first @ generated a line break, and so did a second @. Any
after that were treated as part of the text.

If you have an older Access version, try using two @'s where you want one to
appear. That's the escape sequence.
Paul Shapiro
 
V

Vensia

Sorry, I have found the error. This error happens in any version of Windows.
Let say I have code like this :

Msgbox "You are using trial version " & vbCrLf & "Please call
(e-mail address removed) or (e-mail address removed)"

Thanks.
 
S

Scott McDaniel

Sorry, I have found the error. This error happens in any version of Windows.
Let say I have code like this :

On my WinXP box, running Access 2003, if I run your code:

Msgbox "You are using trial version " & vbCrLf & "Please call (e-mail address removed) or (e-mail address removed)"

I get a messagebox that breaks at the vbCrLf as expected, but otherwise is formatted correctly.

What version of Access are you using? A97 used the @ symbol to format the messagebox, but that went away in later
versions. If you're using 97, you can use Chr(64) to show you @ symbols instead:

Msgbox "You are using trial version " & vbCrLf & "Please call support" & Chr(64) & "xyz.com or info" & Chr(64) &
"xyz.com"



Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com
 
A

Aaron Kempf

or you can just use @@xyz.com right?


Scott McDaniel said:
On my WinXP box, running Access 2003, if I run your code:

Msgbox "You are using trial version " & vbCrLf & "Please call
(e-mail address removed) or (e-mail address removed)"
I get a messagebox that breaks at the vbCrLf as expected, but otherwise is formatted correctly.

What version of Access are you using? A97 used the @ symbol to format the
messagebox, but that went away in later
versions. If you're using 97, you can use Chr(64) to show you @ symbols instead:

Msgbox "You are using trial version " & vbCrLf & "Please call support" &
Chr(64) & "xyz.com or info" & Chr(64) &
 

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

Top