T
tshad
I want to access multiple arguments based on name passed.
For example I have the following asp:textboxes:
BillingAddress1
BillingAddress2
BillingCity
ShippingAddress1
ShippingAddress2
ShippingCity
I have 2 subroutines. Sub A call Sub B and passess either "Billing" or
"Shipping". I wanted to be able to access the objects
(BillingAddress1.Text, ShippingAddress1.Text etc) by a concatenated name. I
don't want to say
If name = "Billing" then
BillingAddress1.Text = "something
else
ShippingAddress2.Text = "something
end if
I want to do something like:
Sub A ()
Call B ("Billing",somevalue1, somevalue2,somevalue3)
Call B ("Shipping",somevalue4,somevalue5,somevalue6)
End Sub
Sub B (Name,value1,value2,value3)
Name + Address1 = value1 ' I know I can't do it this
way - I want to replace "Name + Address1" with something else.
Name + Address2 = value2
Name + Address3 = value3
End Sub
Thanks,
Tom
For example I have the following asp:textboxes:
BillingAddress1
BillingAddress2
BillingCity
ShippingAddress1
ShippingAddress2
ShippingCity
I have 2 subroutines. Sub A call Sub B and passess either "Billing" or
"Shipping". I wanted to be able to access the objects
(BillingAddress1.Text, ShippingAddress1.Text etc) by a concatenated name. I
don't want to say
If name = "Billing" then
BillingAddress1.Text = "something
else
ShippingAddress2.Text = "something
end if
I want to do something like:
Sub A ()
Call B ("Billing",somevalue1, somevalue2,somevalue3)
Call B ("Shipping",somevalue4,somevalue5,somevalue6)
End Sub
Sub B (Name,value1,value2,value3)
Name + Address1 = value1 ' I know I can't do it this
way - I want to replace "Name + Address1" with something else.
Name + Address2 = value2
Name + Address3 = value3
End Sub
Thanks,
Tom