Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / January 2006

Tip: Looking for answers? Try searching our database.

A problem on Click()

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Andy Chan - 08 Jan 2006 17:12 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.