By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,512 Members | 3,689 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,512 IT Pros & Developers. It's quick & easy.

userform to cell on differnt sheet

P: 17
i have a button on sheet 1 and i would like the userform to insert the text i input into sheet 2. And if there is a way the next time i access the userform that is inserts wha i have in the cell already so i could add to it.
Jun 14 '07 #1
Share this Question
Share on Google+
2 Replies


kadghar
Expert 100+
P: 1,295
ok, let mi see if i understood what you want

You have an UserForm and two worksheets; what you want is to write something in worksheet 1, then load the user form, click a button so the text in worksheet 1 appears in worksheet 2 and then unload the form.

And you also want that next time you load the form, it shows the text in worksheet 2??

Well, first of all, lets imagine the user form has a CommandButton and a TextBox.

What you have to do is to doble click the user form and go in the upper right menu to where it says "initialize". there you should write something like:

Expand|Select|Wrap|Line Numbers
  1. Private Sub UserForm_Initialize()
  2. TextBox1.Text = Worksheets(2).Cells(1,1).Value
  3. End Sub
Then double click the command button, and there you should have something like

Expand|Select|Wrap|Line Numbers
  1. Private Sub CommandButton1_click()
  2. worksheets(2).cells(1,1).value = worksheets(1).cells(1,1).value
  3. end sub
And there you go... this will do for the cell A1 in both worksheets, you can always generalize it to any range.

Good Luck

Kad
Jun 14 '07 #2

P: 17
Sorry about the clairty of the question i'm looking for a way to put text unto a cell from a userfrom textbox on a sheet in D2 on sheet2 from sheet1 dose anyone know how to do this?
Jun 19 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.