Skip to Content
avatar image
Former Member

Create Variable (Loop)

Dear all,

I need a loop which is done for the countries "bg", "sk", "cz" ... and so on, which is performed in the SAP script (not via Excel or that like)

Actually I wanted to use the normal VBA codes to create a variable but it doesn't work

e.g.

Dim ctr(5) As String

ctr(1) = "bg"

ctr(2) = "sk)

and so on

Have you any idea how I can create this vector?

thanks

br

Michael


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Nov 05, 2015 at 01:30 PM

    Hello Michael,

    welcome in the Scripting Language forum.

    Try this:

    Dim ctr(4)

    ctr(0) = "dk"

    ctr(1) = "en"

    ctr(2) = "de"

    ctr(3) = "us"

    For i = 0 To UBound(ctr) - 1

      MsgBox ctr(i)

    Next

    Let us know your results.

    Cheers

    Stefan

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 06, 2015 at 08:27 AM

    Dear Stefan,

    **** ... it works.

    I tried everything without the 0

    I'm sorry normally I try not to ask such trivial questions.

    Thank you very very very very much

    bw

    Michael

    Add comment
    10|10000 characters needed characters exceeded