?
Solved

VB equivalent of REPT in Excel

Posted on 2009-12-21
4
Medium Priority
?
3,326 Views
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:
=REPT("X",14)

VFP is the same syntax, different function name.
=REPLICATE("X",14)

What is it in VB?

Thanks Experts,
Joy
0
Comment
Question by:jruhe
  • 2
4 Comments
 
LVL 5

Expert Comment

by:syeager305
ID: 26096875
I believe it's StrDup(5, "x")  or
Microsoft.VisualBasic.StrDup(5, "x")
0
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 1000 total points
ID: 26096885
It's String:
String(14,"X")
for example.
0
 
LVL 85

Expert Comment

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

Author Closing Comment

by:jruhe
ID: 31668557
Helpful, timely, THANKS
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

621 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