![]() |
command button code needed
i got the following code with a command button (thanx dan r.) it does put
the text that i enterd in the apropriate cells. so that part works. thanx but now... im thinking of adding a checkbox1. textbox1, textbox2 and textbox3 only needs be visible when the tickbox1 has a tick in.. and if the commandbutton1 can close the userform aswell? thanx Private Sub CommandButton1_Click() Dim lRow As Long, i As Integer For i = 3 To 5 lRow = Cells(Rows.Count, i).End(xlUp).Row Cells(lRow + 1, i) = Me.Controls("TextBox" & i - 2).Value Next i End Sub |
command button code needed
See this link:
http://support.microsoft.com/kb/829070 -- Dan On Jan 3, 11:34*am, pswanie wrote: i got the following code with a command button (thanx dan r.) *it does put the text that i enterd in *the apropriate cells. so that part works. thanx but now... im thinking of adding a checkbox1. *textbox1, textbox2 and textbox3 only needs be visible when the tickbox1 has a tick in.. and if the commandbutton1 can close the userform aswell? thanx Private Sub CommandButton1_Click() * *Dim lRow As Long, i As Integer * *For i = 3 To 5 * * * lRow = Cells(Rows.Count, i).End(xlUp).Row * * * Cells(lRow + 1, i) = Me.Controls("TextBox" & i - 2).Value * *Next i End Sub |
command button code needed
thanx dan...
"Dan R." wrote: See this link: http://support.microsoft.com/kb/829070 -- Dan On Jan 3, 11:34 am, pswanie wrote: i got the following code with a command button (thanx dan r.) it does put the text that i enterd in the apropriate cells. so that part works. thanx but now... im thinking of adding a checkbox1. textbox1, textbox2 and textbox3 only needs be visible when the tickbox1 has a tick in.. and if the commandbutton1 can close the userform aswell? thanx Private Sub CommandButton1_Click() Dim lRow As Long, i As Integer For i = 3 To 5 lRow = Cells(Rows.Count, i).End(xlUp).Row Cells(lRow + 1, i) = Me.Controls("TextBox" & i - 2).Value Next i End Sub |
All times are GMT +1. The time now is 01:35 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com