Combo Box & Completing Form with concat additions

iamblue91

New Member
Joined
Jan 29, 2019
Messages
1
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)


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
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Forum statistics

Threads
1,215,212
Messages
6,123,649
Members
449,111
Latest member
ghennedy

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top