New

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
I a form in this form i have a text field in this field i can write a name
this name shall in a sheet, no problem with that, but if there in the sheet
all ready are value in A1 and A2 then my new value from my form shall in
cell A3 and son on , so again the next value come into A4

CAn some one help?

Regards
Alvin
 
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
With worksheets("Sheet1")
set cell = .Cells(rows.count,1).End(xlup)
End with
if not isempty(cell) then set cell = cell(2)
cell.Value = Textbox1.Text
End Sub

This assumes a textbox from the control toolbox toolbar on a userform

It would help if you would specify your specific situation - where the
control came from, where the control is located. Then you could get a
specific answer. this is just a guess.

Also, do not assign the textbox to a cell using the ControlSource property.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top