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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replicate

Status
Not open for further replies.

shultz

Programmer
Oct 28, 2001
42
HK
Is there a function in VB to replicate a character or word for certain number of times. Suppose I want to repeat the character "*", 20 times, can I do like this?

replicate("*", 20)

thanks a lot.
 
This should do it for you

Private Sub Command1_Click()
Text1.Text = String$(20, "*")
End Sub

Hope this helps [spin] If you choose to battle wits with the witless be prepared to lose.
[machinegun][ducky]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top