Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 220
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default 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
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
command button code dummy Excel Discussion (Misc queries) 2 December 1st 09 02:57 PM
Command button code(SC) Ram[_5_] Excel Programming 5 June 11th 07 07:18 AM
Command Button Error - Help Needed Urgently Please Salman Excel Worksheet Functions 2 March 7th 07 10:24 AM
Help needed! How use a Command Button to pop up a text box in Excel? [email protected] Excel Programming 2 July 11th 06 07:00 PM
Help needed moving a command button Karoo News[_2_] Excel Programming 1 January 30th 06 04:18 AM


All times are GMT +1. The time now is 05:58 PM.

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

About Us

"It's about Microsoft Excel"