resize table in excel by vba

mohsen yavari 1 Reputation point
2021-12-27T09:07:37.923+00:00

Hello
I want to change table size by vba module. I have variable data row in one sheets an I want to show variable data row in table ; when I add one row in frist sheet expand table automaticaly and show true rows.

Microsoft 365 and Office Development Other
Developer technologies Visual Basic for Applications
{count} votes

2 answers

Sort by: Most helpful
  1. Olaf Helper 47,436 Reputation points
    2021-12-27T11:05:00.58+00:00

    Not very clear what you mean or looking for.

    I want to change table size by vba module

    Start the macro recorder, do the modification, stop the recorder and you have your VBA code, a resize of column "A" looks like

    Columns("A:A").ColumnWidth = 32.0
    
    0 comments No comments

  2. Herbert Seidenberg 1,191 Reputation points
    2022-01-01T01:54:21.713+00:00

    Here is an example that uses the VBA "resize" code
    to resize the result of an Advanced Filter application.
    Power Query would do all this automatically and easier.
    https://www.mediafire.com/file/kgb3p5p2yad06s3/07_23_11.xlsm/file
    https://www.mediafire.com/file/v9law32xyk27ml9/07_23_11.pdf/file

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.