Hi everyone,
Super new to writing VBA code.
I'm trying to set up a rudimentary document control numbering system.
2 sheets in the workbook, "Doc List" & "Options".
I have applied the offset formula for the items under names, and assigned them to names. These are: Author_Name; Discipline; Report_Type. I then put these names in Source Row in properties. They show up when I test the form.
From there, I want to create a document number, but will ask that in a separate forum post.
(Name)s as follows
SubBy (Combo Box)
DocType (Combo Box)
DiscipList (Combo Box)
ProjectCode
LeadAuthor (Combo Box)
DocTitle
VersionNumb
SubmitDoc; ClearButton; CancelButton
SubDate (I want this to be hidden and autopopulated)
Super new to writing VBA code.
I'm trying to set up a rudimentary document control numbering system.
2 sheets in the workbook, "Doc List" & "Options".
I have applied the offset formula for the items under names, and assigned them to names. These are: Author_Name; Discipline; Report_Type. I then put these names in Source Row in properties. They show up when I test the form.
From there, I want to create a document number, but will ask that in a separate forum post.
(Name)s as follows
SubBy (Combo Box)
DocType (Combo Box)
DiscipList (Combo Box)
ProjectCode
LeadAuthor (Combo Box)
DocTitle
VersionNumb
SubmitDoc; ClearButton; CancelButton
SubDate (I want this to be hidden and autopopulated)
Code:
Private Sub CommandButton1_Click()
ProjectNumbering.Show
End Sub
Private Sub UserForm_Initialize()
'Discipline, Document Type, Lead Author, Submitted By are all pre-populated
'Clear ProjectCode
ProjectCode.Value = ""
'Clear DocTitle
DocTitle.Value = ""
'Date of Submission
With SubDate
SubDate.Value = Format(Now(), "mmm-dd-yy HH:mm")
End With
End Sub
Private Sub SubmitDoc_Click()
Dim emptyRow As Long
Worksheets("Doc List").Activate
emptyRow = WorksheetFunction.CountA(Range("A:A")) + 1
Cells(emptyRow, 2).Value = ProjecTitle.Value
Cells(emptyRow, 7).Value = SubDate.Value
Me.Hide
End Sub
'Clear data is need to restart
Private Sub ClearButton_Click()
Call UserForm_Initialize
End Sub
'Cancel input
Private Sub CancelButton_Click()
Unload Me
End Sub