bianca.pira
New Member
- Joined
- Jul 20, 2010
- Messages
- 6
Hi!
Please help me on this issue.
I have 2 workbooks
' B1 workbook
Public Sub UniqueName(params)
MsgBox params(1)
MsgBox params(2)
params(3) = "OK"
End Sub
' B2 workbook
Sub CallAnotherSubroutine()
' Array required to pass parameters
Dim params(1 To 3) As String
params(1) = "Ahhhh"
params(2) = "daaaa"
params(3) = "wrong"
Application.Run "B1.xls!Module1.UniqueName", params
MsgBox params(3)
End Sub
The last MsgBox params(3) returns value "wrong", but i would like it to return the value "OK", which is assigned in Sub UniqueName.
What changes do i have to do in order to obtain the value given in the other procedure?
Thank you.
Please help me on this issue.
I have 2 workbooks
' B1 workbook
Public Sub UniqueName(params)
MsgBox params(1)
MsgBox params(2)
params(3) = "OK"
End Sub
' B2 workbook
Sub CallAnotherSubroutine()
' Array required to pass parameters
Dim params(1 To 3) As String
params(1) = "Ahhhh"
params(2) = "daaaa"
params(3) = "wrong"
Application.Run "B1.xls!Module1.UniqueName", params
MsgBox params(3)
End Sub
The last MsgBox params(3) returns value "wrong", but i would like it to return the value "OK", which is assigned in Sub UniqueName.
What changes do i have to do in order to obtain the value given in the other procedure?
Thank you.