Bookshelf Home | Contents | Index | Search | PDF |
Siebel VB Language Reference > Siebel VB Language Reference >
CStr Function
This standard VB function converts an expression to the data type string.
Syntax
CStr(expression)
Returns
A string containing the value of expression.
Example
This example uses the string functions to operate on a string that was originally entered as a number.
Sub Button_Click
Dim var1, msgtext as String, code as Integer
var1 = 77msgtext = Cstr(var1)
msgtext = Left(var1,1)
code = Asc(msgtext)msgtext = "The first digit you entered was," & msgtext
msgtext = msgtext & ". Its ANSI code is " & code & "."
End SubSee Also
Asc Function
CCur Function
CDbl Function
Chr Function
CInt Function
CLng Function
CSng Function
CVar Function
CVDate Function
Format Function
Bookshelf Home | Contents | Index | Search | PDF |
Siebel VB Language Reference Published: 18 June 2003 |