• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Userform add word located in Row 2 Cell (C) to column (E)

kalua1231

Member
When the userform is completed there would be information added to in column (C) and (D) with that i would like an addition information with that, to have word located in Row 2 Cell (C), to column (E)

Please ask question if i need to explain more in detail

FIY: code pasted here might have other function i would like that this code to coexist with the current code.Thanks Again Chandoo Ninjas.

Userform Code underneath this line
------------------------------------------------------------------------------------------

Private Sub Cmdbutton_close_Click()
Unload Me
End Sub

Private Sub CommandButton1_Click()
Dim iRow As Long
Dim ws As Worksheet
Set ws = Worksheets("GENERAL")

'find first empty row in database
iRow = ws.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row

'check for a Name number
If Trim(Me.textbox_name.Value) = "" Then
Me.textbox_name.SetFocus
MsgBox "Please complete the form"
Exit Sub
End If

'copy the data to the database
ws.Cells(iRow, 3).Value = Me.textbox_name.Value
ws.Cells(iRow, 4).Value = Me.textbox_name.Value

MsgBox "Data added", vbOKOnly + vbInformation, "Data Added"
'clear the data
Me.textbox_name.Value = ""
Me.textbox_name.SetFocus
End Sub
 

Attachments

  • Add Additional Information.jpg
    Add Additional Information.jpg
    339 KB · Views: 3
Hey guys i have found the solution thanks for luke earlier help

added

ws.Cells(iRow, 5).Value = Range("C2").Value

And it works, thanks again Luke.
 
Back
Top