Posts by JaniceWeir

    Re: assign cell with value chosen in a combobox


    Hi Norie,


    Would that work for my example below. Everything works except the combo box called ItemUsedDropDown
    Do I code a different event? What dot notation would I use to refer to the actual text selected at time of clicking the button?



    Private Sub DateOfIncident_Change()
    DateOfIncident.Text = Date
    End Sub



    Private Sub EnterIncidentButton_Click()
    Sheets("Incident Report").Select
    Sheets("Incident Report").Range("A4").Value = NameOfPerson.Text
    Sheets("Incident Report").Range("B4").Value = DateOfIncident.Text
    Sheets("Incident Report").Range("C4").Value = IncidentComment.Text
    Sheets("Incident Report").Range("E4").Value = QuantityUsed.Text
    Sheets("Incident Report").Range("D4").Value = ItemUsedDropDown.Index
    End Sub



    Private Sub EnterIncidentButton_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
    Sheets("Incident Report").Select
    End Sub

    Re: assign cell with value chosen in a combobox


    Quote from _NFio_;205649

    Yeh, funny thing is that, when the user was done, I was thinking about having a button control - say 'create summary page'. The sub would then create a new printer freindly sheet and fill in all the relevent information and their corresponding values automatically. At the time it seemed like overkill as most of my referencing is straight text (as easy as =A1 in the formula bar) and checkboxes (cell-linking) ... Then I got started on obtaining the value of a combobox (instead of the index) and it's digging into the back of my head. Some way, any way, I must solve this absurdly simple task ... It's so logical and it's driving me nuts :D guess I'm wierd like that ...



    Today, I had the exact and same issue. One page with Text Boxes and a Command Button. I just cannot get the Drop Down Box to work. I used .index just to stop it debugging and it returns the index. Instead I want to return the text selected in the combo box.


    Currently, All Text Box data is placed in a row on a separate worksheet in individual cell ranges. It all works, except for the combo box. I am stumped!!!!


    Wish I had an answer for you.


    Private Sub DateOfIncident_Change()
    DateOfIncident.Text = Date
    End Sub



    Private Sub EnterIncidentButton_Click()
    Sheets("Incident Report").Select
    Sheets("Incident Report").Range("A4").Value = NameOfPerson.Text
    Sheets("Incident Report").Range("B4").Value = DateOfIncident.Text
    Sheets("Incident Report").Range("C4").Value = IncidentComment.Text
    Sheets("Incident Report").Range("E4").Value = QuantityUsed.Text
    Sheets("Incident Report").Range("D4").Value = ItemUsedDropDown.Index
    End Sub



    Private Sub EnterIncidentButton_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
    Sheets("Incident Report").Select
    End Sub