• 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.

Input the word FOLDER in column (D) automatically

kalua1231

Member
Userform is working, when i click enter the word written in the userform will be display in Column (C).

What i would like is to have it automatically input the word FOLDER in column (D) with it.Thank you

Please if you need more information please ask.
 

Attachments

  • Fix 8 20.xlsm
    202.7 KB · Views: 2
  • Input Word 1.jpg
    Input Word 1.jpg
    263.2 KB · Views: 4
  • Input Word 2.jpg
    Input Word 2.jpg
    273.9 KB · Views: 4
  • Input Word 3.jpg
    Input Word 3.jpg
    222.7 KB · Views: 3
FYI the Userform button is the Green square name (ADD FOLDER), remember the actual userform is working i just want it to also input automatically the word FOLDER in COLUMN (D), so that it can show beside the information that will be displayed in Column (C).
 
This is the actual Code on the userform
-----------------------------------------------------------------------------------

Private Sub Cmdbuttom_add_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

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

Private Sub Cmdbuttom_close_Click()
Unload Me
End Sub
 
Hey guys i found out how to solve this, what i did was copy and paste

ws.Cells(iRow, 3).Value = Me.textbox_name.Value
ws.Cells(iRow, 4).Value = "FOLDER"

Changed the Row to 4 and "FOLDER"
 
Back
Top