Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default link textbox to cell

i got textbox1 thru textbox7 on a userform. when a user click commandbutton3
the info from textbox1 must go in the next open cell in column n
textbox2 must go in the next open cell in column m
textbox3 must go in the next open cell in column o
etc..

thanx

Phillip
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default link textbox to cell

Nothing fancy, but it should work.

Private Sub CommandButton3_Click()
Lr1 = Cells(Rows.Count, 14).End(xlUp).Row
Lr2 = Cells(Rows.Count, 13).End(xlUp).Row
Lr3 = Cells(Rows.Count, 15).End(xlUp).Row
On Error GoTo ErrHndl:
Range("N" & Lr1) = TextBox1.Text
Range("M" & Lr2) = TextBox2.Text
Range("O" & Lr3) = TextBox3.Text
ErrHndl:
If Err.Number < 0 Then
MsgBox "No Text"
End If
End Sub

"pswanie" wrote:

i got textbox1 thru textbox7 on a userform. when a user click commandbutton3
the info from textbox1 must go in the next open cell in column n
textbox2 must go in the next open cell in column m
textbox3 must go in the next open cell in column o
etc..

thanx

Phillip

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Link a textbox on a sheet to a cell?! Webtechie Excel Discussion (Misc queries) 2 March 26th 10 04:28 PM
if i sort cell that has link to another page how to keep link steve Bahrain Excel Discussion (Misc queries) 1 August 16th 06 01:20 PM
if i sort cell that has link to another page how to keep link steve Bahrain Excel Discussion (Misc queries) 0 August 16th 06 07:37 AM
HELP! I Lost The Ability To Advance From TextBox To TextBox With the ENTER Or The TAB Keys Minitman[_4_] Excel Programming 0 February 22nd 05 08:50 PM
Textbox Bug? Missing/delayed update of textbox filled via VBA MarcM Excel Programming 0 November 4th 04 05:43 PM


All times are GMT +1. The time now is 09:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"