Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Just a quick follow up... the String function will only repeat single
characters (which, of course, is what the OP seems to have asked for), but if one wanted to repeat, say, the string value "AB" some number of times, trying this... MyString = String(5, "AB") would result in "AAAAA" being assigned to the variable. The following is one method to repeat the string "AB", say, five times... MyString = Replace(String(5, Chr$(1)), Chr$(1), "AB") Of course, you could replace the "AB" text string with any string of characters. Rick "Trevor Williams" wrote in message ... Hi Mike Try this: Dim MyString MyString = String(5, "*") ' Returns "*****". "Mike H." wrote: In another language I am familiar with if I wanted to express the text "-----" I could say repeat("-",5). Is there something similar in VBA? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Repeat | Excel Discussion (Misc queries) | |||
Repeat F2 | Excel Programming | |||
how to repeat rows at the bottom while using the rows repeat at to | Setting up and Configuration of Excel | |||
Title Cut Off if Rows to Repeat & Columns to Repeat are Both Selec | Excel Discussion (Misc queries) | |||
Repeat job | Excel Programming |