Form Combo Boxes to Default to last input row data

scottmcclean

New Member
Joined
Jul 2, 2014
Messages
23
Hi all,
this is my first post and I am currently an occasional user of excel - this is my first attempt at Excel VBA
My question to the forum is this:

I am using Excel 2007 and would like to create a fairly complex user form that is basically a daily operations report where each row=1 days report. The form works well and updates the excel sheet perfectly.

My problem is that my daily report uses up to 10 combo boxes that allow the input of team members. I would like for the user NOT to have to keep re-selecting these team members from the combo boxes as they do not change that often. When the form is opened, is there a way to get the combo boxes to default to the previous "days" team members so that they can be re-used into the current days report.

Is this at all possible?

Many thanks in advance


Scott
 

Some videos you may like

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
Welcome to MrExcel.

How would one determine who were the team members for the previous day? How is your data laid out?
 
Last edited:

scottmcclean

New Member
Joined
Jul 2, 2014
Messages
23
Hi Andrew, thanks for replying. The combo boxes populate specific cells within the sheet: so the team members for the previous day would be in cells 15, 18 and 21 of each row.

.Cells(iRow, 15).Value = Me.cmbTeam1.Value
.Cells(iRow, 18).Value = Me.cmbTeam2.Value
.Cells(iRow, 21).Value = Me.cmbTeam3.Value
 

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
You can reverse those assignment expressions with an appropriate value for iRow, eg:

Code:
Me.cmbTeam1.Value = Cells(iRow, 15).Value
 

Watch MrExcel Video

Forum statistics

Threads
1,101,748
Messages
5,482,628
Members
407,355
Latest member
Beinleif

This Week's Hot Topics

  • Finding issue in If elseif else with For each Loop
    Finding issue in If elseif else with For each Loop I have tried this below code but i'm getting in Y column filled with W005. Colud you please...
  • MsgBox Error
    Hi Guys, I have the below error show up when i try and run my macro in File1 but works fine if i copy and paste the same code into file2. [ATTACH...
  • CELL FORMAT - IF CONDITION
    My Cell Format is [B]""0.00" Cr". [/B]But in the cell, it is showing 123.00 for editing. (123 is entry figure). (Data imported from other...
  • Show numbers nearly the same
    Is this possible. I have a number that can change very time eg 0.00001234 Then I have a lot of numbers 0.0000001, 0.0000002, 0.00000004...
  • Please i need your help to create formula
    I need a formula in cell B8 to do this >>if b1=1 then multiply ( cell b8) by 10% ,if b1=2 multiply by 20%,if=3 multiply by 30%. Thank you in...
  • Got error while adding column and filter
    Got error while adding column and filter In column Z has some like "Success" and "Error". I want to add column in AA if the Z cell value is...
Top