ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   adding content to a cell (https://www.excelbanter.com/excel-programming/351976-adding-content-cell.html)

cedtech23

adding content to a cell
 

I have a text box called txtName on my form that a user input data.
want that data to popluate to a cell C7 in a worksheet called hrfrom
when the user clicks on the command button call cmdOK. I tried th
code below but no luck. Any ideas??

Private Sub cmdOK_Click()
C7.Value = txtName.Value
Unload Me
End Su

--
cedtech2
-----------------------------------------------------------------------
cedtech23's Profile: http://www.excelforum.com/member.php...fo&userid=3102
View this thread: http://www.excelforum.com/showthread.php?threadid=50690


Toppers

adding content to a cell
 
Range("C7").value=txtName.Value


"cedtech23" wrote:


I have a text box called txtName on my form that a user input data. I
want that data to popluate to a cell C7 in a worksheet called hrfromm
when the user clicks on the command button call cmdOK. I tried the
code below but no luck. Any ideas??

Private Sub cmdOK_Click()
C7.Value = txtName.Value
Unload Me
End Sub


--
cedtech23
------------------------------------------------------------------------
cedtech23's Profile: http://www.excelforum.com/member.php...o&userid=31022
View this thread: http://www.excelforum.com/showthread...hreadid=506903



Norman Jones

adding content to a cell
 
Hi Cedtech,

Try:

'=============
Private Sub cmdOK_Click()
Sheets("hrfromm").Range("C7").Value = txtName.Value
Unload Me
End Sub
'<<=============


---
Regards,
Norman


"cedtech23" wrote
in message ...

I have a text box called txtName on my form that a user input data. I
want that data to popluate to a cell C7 in a worksheet called hrfromm
when the user clicks on the command button call cmdOK. I tried the
code below but no luck. Any ideas??

Private Sub cmdOK_Click()
C7.Value = txtName.Value
Unload Me
End Sub


--
cedtech23
------------------------------------------------------------------------
cedtech23's Profile:
http://www.excelforum.com/member.php...o&userid=31022
View this thread: http://www.excelforum.com/showthread...hreadid=506903





All times are GMT +1. The time now is 08:43 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com