none
Referencing Excel table column in VBA RRS feed

  • Question

  • Provided an existing named Excel table "tblBrugere" with a column "Bruger":

        Dim rngOpslagsmatrix As Range
        Set rngOpslagsmatrix = Range("tblBrugere")
        rngOpslagsmatrix.Select

    selects the data area of the table, while

        Dim rngOpslagsmatrix As Range
        Set rngOpslagsmatrix = Range("tblBrugere[Bruger]")
        rngOpslagsmatrix.Select

    return an error in the second line:

    Run-time error '1004':
    Method 'Range' of object'_Global' failed

    How do I reference the column "Bruger"?

    Thursday, December 1, 2016 1:55 PM

Answers

  • I have found an error in my code. Problem solved. I am sorry for your inconvenience.
    • Marked as answer by MartinAnd67 Thursday, December 1, 2016 6:08 PM
    Thursday, December 1, 2016 6:08 PM

All replies