cancel
Showing results for 
Search instead for 
Did you mean: 

Create Variable (Loop)

Former Member
0 Kudos

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


Accepted Solutions (1)

Accepted Solutions (1)

stefan_schnell
Active Contributor
0 Kudos

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

Answers (1)

Answers (1)

Former Member
0 Kudos

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

stefan_schnell
Active Contributor
0 Kudos

Hello Michael,

you are welcome.

Cheers

Stefan