+ Reply to Thread
Results 1 to 4 of 4

Resize table VBA

Hybrid View

Undo Resize table VBA 12-10-2023, 03:27 PM
Sintek Re: Resize table VBA 12-11-2023, 02:21 AM
Undo Re: Resize table VBA 12-11-2023, 10:38 AM
Sintek Re: Resize table VBA 12-11-2023, 03:31 PM
  1. #1
    Forum Contributor
    Join Date
    07-14-2019
    Location
    Dubai
    MS-Off Ver
    2019
    Posts
    927

    Resize table VBA

    I am looking to solve this code, it gives error
    Would anyone be able to help?


    ActiveSheet.ListObjects(1).Resize DataBodyRange.Resize(2, 4)
    code should work like this one, but with listobject reference


    Sheet2.ListObjects("Table1").Resize Range("Table1[#All]").Resize(2, 4)
    Thanks

  2. #2
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,958

    Re: Resize table VBA

    Perhaps...
    With ActiveSheet.ListObjects(1)
        .Resize Range(.Name & "[#All]").Resize(.Range.Rows.Count + 2, .Range.Columns.Count + 4)
    End With
    Good Luck...
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
    Also....Add a comment if you like!!!!
    And remember...Mark Thread as Solved...
    Excel Forum Rocks!!!

  3. #3
    Forum Contributor
    Join Date
    07-14-2019
    Location
    Dubai
    MS-Off Ver
    2019
    Posts
    927

    Re: Resize table VBA

    Thanks for giving me an idea
    I got it
    With ActiveSheet.ListObjects(1)
    .Resize Range(.Name & "[#All]").Resize(2, 4)
    End With

  4. #4
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,958

    Re: Resize table VBA

    Glad to have helped...Tx for rep +

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Resize rows in a table. Resize only values and ignore functions inside the table.
    By Fishtail in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-24-2022, 10:14 AM
  2. [SOLVED] Resize a table or........?
    By Frigide in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 11-25-2021, 06:47 AM
  3. Replies: 1
    Last Post: 09-19-2021, 08:29 PM
  4. Replies: 5
    Last Post: 06-12-2020, 01:55 PM
  5. [SOLVED] Resize table to my used range
    By jomili in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-21-2016, 01:22 PM
  6. UserInterFaceOnly and resize of table
    By wibble98 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-14-2014, 10:08 AM
  7. [SOLVED] Resize table to same row count as a piovt table
    By djon5020 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-13-2014, 01:43 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1