none
VBA Macro fails to recognize a table header RRS feed

  • Question

  • VBA Macro fails to recognize a table header but does recognize the table. I have changed table header name but nothing works?
    Wednesday, May 13, 2015 7:49 PM

Answers

  • Hi u3rick,

    >>VBA Macro fails to recognize a table header but does recognize the table. I have changed table header name but nothing works?

    Do you want to get the table with header by using VBA? If so, you could use ListObject.Range Property (Excel) to get the table with header. Some key code as below:

    Sub gettable()
    ActiveSheet.ListObjects("table1").Range.Select
    MsgBox ActiveSheet.ListObjects("table1").Range(1, 1)  'get column1
    End Sub

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Friday, May 15, 2015 10:28 AM

All replies

  • Hi,

    This is the forum to discuss questions and feedback for Microsoft Excel, I'll move your question to the MSDN forum for Excel

    http://social.msdn.microsoft.com/Forums/en-US/home?forum=exceldev&filter=alltypes&sort=lastpostdesc

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.

    George Zhao
    TechNet Community Support


    It's recommended to download and install Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office programs.

    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.
    Thursday, May 14, 2015 7:11 AM
  • Hi u3rick,

    >>VBA Macro fails to recognize a table header but does recognize the table. I have changed table header name but nothing works?

    Do you want to get the table with header by using VBA? If so, you could use ListObject.Range Property (Excel) to get the table with header. Some key code as below:

    Sub gettable()
    ActiveSheet.ListObjects("table1").Range.Select
    MsgBox ActiveSheet.ListObjects("table1").Range(1, 1)  'get column1
    End Sub

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Friday, May 15, 2015 10:28 AM