Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
command button code | Excel Discussion (Misc queries) | |||
Command button code(SC) | Excel Programming | |||
Command Button Error - Help Needed Urgently Please | Excel Worksheet Functions | |||
Help needed! How use a Command Button to pop up a text box in Excel? | Excel Programming | |||
Help needed moving a command button | Excel Programming |