(Solved) – Range error on one PC, but not on another with same Excel version

  • by
(solved)-–-range-error-on-one-pc,-but-not-on-another-with-same-excel-version

I am building an app on my desktop that populates some comboboxes as such:

For Each lr In tbl.ListRows
    With CBx_SELECT
        .AddItem
        .Column(0, .ListCount - 1) = CInt(Trim(Split(lr.Range(, 1), sDelimiter)(1)))
        .Column(1, .ListCount - 1) = lr.Range(, 1)        '''' .Value ''''
    End With
Next

My question lies in the fact that when I ran the app on my laptop I got a type mismatch on the .Column(1, .ListCount - 1) = lr.Range(, 1) statement, which was fixed by adding a .value at the end. Both installations are 64-bit, 1911, 20364.

Could this be caused by some option in the Excel application and which would that be?

PS I read When to use range.value? and I will follow the recommendation to explicitly ask for the .value property, but the question still stands

Leave a Reply

Your email address will not be published. Required fields are marked *