Dear all,
I have a form "F" on which there is a command button "B" and a textboxe
"T". "S" is another string variable defined somewhere else outside the form.
I want to have the value of the cell A1 in the sheet where its name is given
in S changed to the value of T, what should I write in sub B_Click()? (For
example, if "S" contains "Sheet1" while "T" contains "ABC", then I want
Worksheets("Sheet1").Range("A1").Value = "ABC".) I don't know how to pass
the value in "S" into sub B_Click(). Thanks in advance!
Best Regards,
Andy
Bob Phillips - 08 Jan 2006 17:25 GMT
Worksheets(S).Range("A1").Value = T.Text
make sure that S is a public variable so that the form can see it.

Signature
HTH
RP
(remove nothere from the email address if mailing direct)
> Dear all,
>
[quoted text clipped - 8 lines]
> Best Regards,
> Andy