Vbtab - Not working

Hi
Iam generating email thru' V.basic-6.0 using winsock
And formatting the message body using 'vbtab'.
'vbcrlf' is working but 'vbtab' does't show any effect to the message body.

Example:
       msgbody = variable1 & vbtab & varaible2

When msgbody is directed to email , it shows as below
       variable1variable2

But I would like to have the result as
       variable1      variable2    

Suggestion pls...

Thanks
Deva
deva_rajeshAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Reggie_BECommented:
and can't you replace vbtab by some spaces ?

& space(10) &
or just try tab(1) ;)
0
deva_rajeshAuthor Commented:
Hi
using space() creates space but does't work as tab ..
tab(1) is not working
Deva
0
Reggie_BECommented:
and SendKeys ("{TAB}") ?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

deva_rajeshAuthor Commented:
Giving me the error

expected function or variable

Deva
0
DocMCommented:
Hi,
Use a function to format the width of the variables before printing:

Function FormatWidthOf(var1, myWidth) As String

    FormatWidthOf = CStr(var1)
    While Me.TextWidth(FormatWidthOf) < myWidth
        FormatWidthOf = " " & FormatWidthOf
    Wend

End Function

Private Sub Command1_Click()
    Me.Font = Text1.Font
    Me.FontSize = Text1.FontSize
    Text1.Text = ""

    myWidth = Me.TextWidth("01234567890")

    var1 = 123.45
    var2 = 6.78
   
    Text1.Text = Text1.Text & FormatWidthOf(var1, myWidth) & FormatWidthOf(var2, myWidth) & vbCrLf

     
End Sub
0
avya2kCommented:
better use
msgbody = variable1 & chr(9) & varaible2
0
deva_rajeshAuthor Commented:
hi , its somewhat ok, but not creating space as exactly as vbtab does.
0
deva_rajeshAuthor Commented:
chr(9) is also giving no effect
0
BarcaCommented:
umm

""& variable1 &"" & vbtab & ""& varaible2 &""
0
avya2kCommented:
vbtab and chr(9) is one and the same

what method u r using or in what control you are formatting your msgbody
0
deva_rajeshAuthor Commented:

 ""& variable1 &"" & vbtab & ""& varaible2 &"" 

I hv to use quotation mark or something else ?

0
deva_rajeshAuthor Commented:
HI i thinkg the content type should b changed

I use

Call SendData(mysock, "Content-Type: text/html; charset=ISO-8859-9" & vbCrLf)

Should i change this to something else?
0
BarcaCommented:
umm....i don't know what type of varaible 1&2 are,

but i suggest change it to string first.

str(varaible1) & vbtab & str(varaible2)
0
avya2kCommented:
if you have set content type to html or your mailbody is in html format then you can not insert tab by chr(9) or vbtab
you have to do it like this

variable1 & "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" & varaible2

&nbsp; = one space
0
avya2kCommented:
this is how one should insert more than one space characters in HTML
0
DocMCommented:
If you use the <PRE> </PRE> tags, you don't need &nbsp; to insert spaces. The text between <PRE> and </PRE> will appear as is.

<html>
<TITLE></TITLE>
<BODY>
<PRE>

   AIM Global Technology           $    10.8320      
   AIM Global Health Sciences Cla  $     5.7070      
   AIM RSP European Growth         $     3.9730  
   
</PRE>

</BODY>
</HTML>
0
CleanupPingCommented:
Hi deva_rajesh,
This old question (QID 20567247) needs to be finalized -- accept an answer, split points, or get a refund.  Please see http://www.cityofangels.com/Experts/Closing.htm for information and options.
0
GPrentice00Commented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

 -->PAQ - no points refunded

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER

GPrentice00
Cleanup Volunteer
0
YensidModCommented:
This question is PAQed and no points refunded (of 500)

YensidMod
Expert Exchange Moderator
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming Languages-Other

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.