Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
User Form texbox insert text in cell - excel 2003
Hello,
I've created a user form with 3 text boxes. I can't get the text boxes to insert data into cells. Here is my code: Private Sub CommandButton1_Click() 'Find blank cell Dim rngBlank As Range Set rngBlank = Range("A5:A20").Find("") If rngBlank Is Nothing Then MsgBox "No cell found" Else 'Insert data in blank cell rngBlank.Offset(1, 0).Value = TextBox1.Text rngBlank.Offset(1, 1).Value = TextBox2.Text rngBlank.Offset(1, 2).Value = TextBox3.Text End If Unload UserForm1 End Sub How can this code be modified to add text begining with A5, then find the next blank cell insert data through 20? Thanks for your help, jfcby |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
User Form texbox insert text in cell - excel 2003
Hello,
I found a code that would work! Thank you, jfcby jfcby wrote: Hello, I've created a user form with 3 text boxes. I can't get the text boxes to insert data into cells. Here is my code: Private Sub CommandButton1_Click() 'Find blank cell Dim rngBlank As Range Set rngBlank = Range("A5:A20").Find("") If rngBlank Is Nothing Then MsgBox "No cell found" Else 'Insert data in blank cell rngBlank.Offset(1, 0).Value = TextBox1.Text rngBlank.Offset(1, 1).Value = TextBox2.Text rngBlank.Offset(1, 2).Value = TextBox3.Text End If Unload UserForm1 End Sub How can this code be modified to add text begining with A5, then find the next blank cell insert data through 20? Thanks for your help, jfcby |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Display contents of a cell in a user form text box -- Excel 2003 VBA | Excel Discussion (Misc queries) | |||
can i insert a text box in a footer in excel 2003 | Excel Discussion (Misc queries) | |||
How do i insert my excel user name into a cell? | Excel Discussion (Misc queries) | |||
In Excel, how do I insert User Name (author) in a cell. | Excel Discussion (Misc queries) | |||
Posting text typed inside a TexBox into the worksheet cell | Excel Programming |