?
Solved

Vbtab - Not working

Posted on 2003-03-29
19
Medium Priority
?
701 Views
Last Modified: 2013-11-13
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
0
Comment
Question by:deva_rajesh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
  • 2
  • +5
19 Comments
 

Expert Comment

by:Reggie_BE
ID: 8229829
and can't you replace vbtab by some spaces ?

& space(10) &
or just try tab(1) ;)
0
 

Author Comment

by:deva_rajesh
ID: 8229840
Hi
using space() creates space but does't work as tab ..
tab(1) is not working
Deva
0
 

Expert Comment

by:Reggie_BE
ID: 8229847
and SendKeys ("{TAB}") ?
0
Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

 

Author Comment

by:deva_rajesh
ID: 8229876
Giving me the error

expected function or variable

Deva
0
 
LVL 3

Expert Comment

by:DocM
ID: 8229966
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
 
LVL 5

Expert Comment

by:avya2k
ID: 8230046
better use
msgbody = variable1 & chr(9) & varaible2
0
 

Author Comment

by:deva_rajesh
ID: 8236742
hi , its somewhat ok, but not creating space as exactly as vbtab does.
0
 

Author Comment

by:deva_rajesh
ID: 8236745
chr(9) is also giving no effect
0
 
LVL 3

Expert Comment

by:Barca
ID: 8252001
umm

""& variable1 &"" & vbtab & ""& varaible2 &""
0
 
LVL 5

Expert Comment

by:avya2k
ID: 8258837
vbtab and chr(9) is one and the same

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

Author Comment

by:deva_rajesh
ID: 8258934

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

I hv to use quotation mark or something else ?

0
 

Author Comment

by:deva_rajesh
ID: 8258971
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
 
LVL 3

Expert Comment

by:Barca
ID: 8259252
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
 
LVL 5

Expert Comment

by:avya2k
ID: 8259274
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
 
LVL 5

Expert Comment

by:avya2k
ID: 8259285
this is how one should insert more than one space characters in HTML
0
 
LVL 3

Expert Comment

by:DocM
ID: 8261880
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
 

Expert Comment

by:CleanupPing
ID: 8531376
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
 
LVL 6

Expert Comment

by:GPrentice00
ID: 9440751
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
 

Accepted Solution

by:
YensidMod earned 0 total points
ID: 9495570
This question is PAQed and no points refunded (of 500)

YensidMod
Expert Exchange Moderator
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question