Hello guys i am trying to have typed words on the userform display on BOLD FONT when sent on the excel file.
Thanks for your time and help.
Thanks for your time and help.
Code:
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
ws.Cells(iRow, 5).Value = Range("C2").Value
ws.Cells(iRow, 6).Value = "HOLD *"
ws.Cells(iRow, 7).Value = "1"
ws.Cells(iRow + 1, 4).Value = Me.textbox_name.Value
ws.Cells(iRow + 1, 5).Value = Range("C2").Value
ws.Cells(iRow + 1, 6).Value = "HOLD *"
ws.Cells(iRow + 1, 7).Value = "Z"
MsgBox "Data added", vbOKOnly + vbInformation, "Data Added"
'clear the data
Me.textbox_name.Value = ""
Me.textbox_name.SetFocus
End Sub