Hi guys, can you help me with this,
i have this subroutine in my mini program
This will assign the same string value declare on valueXY.
Problem is, if i want to assign different string in each txt, what will i do?
I know it's possible to assign diffent value on txt by codes like this
'if txt is txt(2,2)
txt(0, 0) = "Dog"
txt(0, 1) = "Cat"
txt(1, 0) = "Bulldog"
txt(1, 1) = "Burma"
but is it possible to increse the arguments in valueXY instead (if i called sub tabla and assign 5 in rowx and 3 on coly, the next argument will be the value of each array)?
this is the example output
dog,cat,bird,fi sh
bulldog,burma,p arrot,gold fish
bone,tuna,crack er,pellet
i have this subroutine in my mini program
Code:
Public Sub tabla(ByVal rowX As Integer, ByVal colY As Integer, ByVal valueXY As String) Dim txt(,) As String Dim counterX As Integer = 0 Dim counterY As Integer ReDim txt(rowX, colY) Do Until rowX = counterX counterY = 0 Do Until colY = counterY txt(counterX, counterY) = valueXY counterY += 1 Loop counterX += 1 Loop End Sub
Problem is, if i want to assign different string in each txt, what will i do?
I know it's possible to assign diffent value on txt by codes like this
'if txt is txt(2,2)
txt(0, 0) = "Dog"
txt(0, 1) = "Cat"
txt(1, 0) = "Bulldog"
txt(1, 1) = "Burma"
but is it possible to increse the arguments in valueXY instead (if i called sub tabla and assign 5 in rowx and 3 on coly, the next argument will be the value of each array)?
this is the example output
dog,cat,bird,fi sh
bulldog,burma,p arrot,gold fish
bone,tuna,crack er,pellet