none
identify selected fields/columns RRS feed

  • Question

  • using 2007 & 2010

    is it possible to identify which fields/columns have been selected via VBA?

    IE - suppose the user selects Start, Finish, Duration and Critical - I need to then identify that these - and only these - fields/columns have been selected.

    I know how to identify the view and the table - i need to also identify the selected fields/columns.

    is that possible?

    gman

    Wednesday, July 18, 2012 1:39 PM

All replies

  • gman

    Application.ActiveSelection.FieldNameList.Count - Gives you a count of the selected fields
    Application.ActiveSelection.FieldNameList.Item(1) - Gives you the first column name in the selection   

    You can loop thorough to check each column name

    hope this helps

    • Proposed as answer by Mike Agnello Thursday, July 19, 2012 7:55 PM
    Wednesday, July 18, 2012 2:10 PM
  • Thanks Mike,

    just what i needed.  i put the results into an array so i can address them individually.  works great!

    gman

    Thursday, July 19, 2012 12:55 PM