+ Reply to Thread
Results 1 to 8 of 8

Use VBA to create & name table

  1. #1
    Registered User
    Join Date
    10-06-2020
    Location
    West Midlands
    MS-Off Ver
    16
    Posts
    9

    Use VBA to create & name table

    I get run time error 438 object doesnt support this property or method. I dont inderstand why it wont work. I have this running with command button. If I run it romally (using green play button) it works perfectly.
    Please help thank you

    '''Region address for table'''
    Please Login or Register  to view this content.
    '''Format Table +m if month added to table name''''
    Please Login or Register  to view this content.
    (ws is set as sheet 1)
    Last edited by alansidman; 10-19-2020 at 03:55 PM.

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,072

    Re: Use VBA to create & name table

    It should be ListObjects plural

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,336

    Re: Use VBA to create & name table

    See the yellow banner. Post a sample workbook.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,336

    Re: Use VBA to create & name table

    I don't see how it can work manually. This works for me, run manually.

    Please Login or Register  to view this content.
    As Fluff says, ListObject should be ListObjects

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,855

    Re: Use VBA to create & name table

    Code Tags Added
    Your post does not comply with Rule 2 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,072

    Re: Use VBA to create & name table

    If the button is on a different sheet use
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    10-06-2020
    Location
    West Midlands
    MS-Off Ver
    16
    Posts
    9

    Re: Use VBA to create & name table

    Thank you all that really helps. I have it working now great. Plus will have a look through the forum rules again (sorry still new to this) Thank you

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,336

    Re: Use VBA to create & name table

    You're welcome.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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] Trying to create a dynamic table so I can create a updating drop down list.
    By sbobster15 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-16-2019, 11:43 AM
  2. VBA to create dynamic table/pivot table to auto refresh charts on other sheets
    By jamesbutler2021 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-12-2019, 09:27 AM
  3. Replies: 1
    Last Post: 11-12-2018, 02:46 PM
  4. Replies: 6
    Last Post: 01-24-2017, 06:56 PM
  5. How to create a dynamic macro that will create pivot table
    By thlee1122 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-08-2015, 11:49 PM
  6. How to create a macro to create a pivot table on a new sheet
    By thlee1122 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-19-2015, 11:14 AM
  7. Create a macro to create a pivot table in a worksheet
    By Triscia in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-15-2015, 10:53 AM

Tags for this Thread

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