VB equivalent of REPT in Excel

Posted on 2009-12-21
Last Modified: 2012-05-08
What's the VB6 equivalent of the REPT command in Excel, or the REPLICATE command in VFP?  The one where you can repeat a character, say, "X", a certain number of times?  Say, 14?

In Excel, it's:

VFP is the same syntax, different function name.

What is it in VB?

Thanks Experts,
Question by:jruhe
    LVL 5

    Expert Comment

    I believe it's StrDup(5, "x")  or
    Microsoft.VisualBasic.StrDup(5, "x")
    LVL 85

    Accepted Solution

    It's String:
    for example.
    LVL 85

    Expert Comment

    by:Rory Archibald
    Possibly should have read more closely - String is the VBA version, it may not be identical in VB6.
    LVL 4

    Author Closing Comment

    Helpful, timely, THANKS

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  ( Here (http…
    This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
    The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
    This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

    734 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

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now