Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing the Same Character

Status
Not open for further replies.

moonoo

Programmer
May 17, 2000
62
US
Hi
Mine is avery simple question . How do i print the
same character a number of time . For example if i
want to Print a space a number of time . I write
space(len) . Is there any built in function available for other
characters also..
Thanks
 
Would it be possible to reference another value?

dim MyScoreVal
' check current score
MyScoreVal = TxtCurrentScore()

' Get variable * depending on TxtCurrentScore
strNew = String((MyScoreVal),"*")

 
Any number will do but be careful that only numbers are entered in that text box. Better
Code:
Dim lngAsterL as long
Dim strAsterL as string
lngAsterL = 0
strAsterL = txtCurrentScore.text
IF IsNumeric(strAsterL) = True then
    lngAsterL = CLng(strAsterL) 'Expicit Coerce
End If
strNew = String(lngAsterL,"*")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top