hurricanedaphne
New Member
- Joined
- Nov 9, 2010
- Messages
- 8
I've created my first userform and it is not updating to a spreadsheet upon Save. I've read numerous articles & copied & pasted code with appropriate changes for names, and the closest I got was the combo boxes would cause an error - when I made those lines 'comments', then the text lines would update to the column headers only. I've made my combo list data into dynamic tables, I tried other code I found, but I'm stuck. I would really appreciate some help.
Here's my table for the user form to update: I see in the preview the headers aren't showing, but they are the same as the userform and of course the VBA code farther down.
Here's my backup for the combo boxes:
I've attached a snip of my userform: All combo boxes have correct row-reference in properties
of the named ranges on the backup sheet.
And finally - the code that isnt' working. It will 'clear' the form, but not update the spreadsheet. I apologize for the length of the post and any/all help will be greatly appreciated!
Here's my table for the user form to update: I see in the preview the headers aren't showing, but they are the same as the userform and of course the VBA code farther down.
Status | Estimator | Project Name | Project Address | Date Submitted | Client | Bid Amount | Bid Type | Project Type | Competitors | Winning GC | Notification Date | Notes | Fee |
Undecided | MH | 1125 Schilling Blvd | 1125 Schilling | 5/15/2020 | Boyle | $60,787 | Competative | Office TI | A&R | ||||
Bidding | BL | 6060 Poplar Ave | 6060 Poplar | 5/28/2020 | Boyle | Office TI | |||||||
Loss | BL | Altana | 569 N. McClean | 5/14/2020 | $1,534,440 | Competative | Ground Up | Metro, GTG | Got beat by $130k | ||||
Win | SC | Desoto Tourism | Southaven, MS | AERC | $330,000 | Competative | Office TI | Nickson | |||||
Here's my backup for the combo boxes:
Project Tracker for Forum.xlsm | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
1 | Status | Estimator | Bid Type | Project Type | ||
2 | Bidding | BC | Budget/Competative | Exterior | ||
3 | Dead | BL | Budget/Single Source | Ground Up | ||
4 | Loss | BS | Competative | Industrial TI | ||
5 | Undecided | DM | Negotiated | Medical | ||
6 | Win | DW | OH&P | Office TI | ||
7 | FS | Open Bid | Other | |||
8 | HT | Retail TI | ||||
9 | JB | |||||
10 | MH | |||||
11 | RS | |||||
12 | RW | |||||
13 | SC | |||||
Backup |
I've attached a snip of my userform: All combo boxes have correct row-reference in properties
And finally - the code that isnt' working. It will 'clear' the form, but not update the spreadsheet. I apologize for the length of the post and any/all help will be greatly appreciated!
VBA Code:
Private Sub cmdAddProject_Click()
'Copy input values to sheet.
Dim lRow As Long
Dim ws As Worksheet
Set ws = Worksheets("Project List")
lRow = ws.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
With ws
.Cells(l, 1).Value = Me.cboStatus.Value
.Cells(l, 2).Value = Me.cboEstimator.Value
.Cells(1, 3).Value = Me.ProjectName.Value
.Cells(1, 4).Value = Me.ProjectAddress.Value
.Cells(1, 5).Value = Me.DateSubmitted.Value
.Cells(1, 6).Value = Me.Client.Value
.Cells(1, 7).Value = Me.BidAmount.Value
.Cells(1, 8).Value = Me.cboBidType.Value
.Cells(1, 9).Value = Me.cboProjectType.Value
.Cells(1, 10).Value = Me.Competitors.Value
.Cells(1, 11).Value = Me.WinningGC.Value
.Cells(1, 12).Value = Me.NotificationDate.Value
.Cells(1, 13).Value = Me.Notes.Value
.Cells(1, 14).Value = Me.Fee.Value
End With
'Clear input controls.
Me.cboStatus.Value = ""
Me.cboEstimator.Value = ""
Me.ProjectName.Value = ""
Me.ProjectAddress.Value = ""
Me.DateSubmitted.Value = ""
Me.Client.Value = ""
Me.BidAmount.Value = ""
Me.cboBidType.Value = ""
Me.cboProjectType.Value = ""
Me.Competitors.Value = ""
Me.WinningGC.Value = ""
Me.NotificationDate.Value = ""
Me.Notes.Value = ""
Me.Fee.Value = ""
End Sub