+ Reply to Thread
Results 1 to 7 of 7

unable to delete table with certain prefix via vba

  1. #1
    Registered User
    Join Date
    11-29-2020
    Location
    india
    MS-Off Ver
    2021
    Posts
    92

    unable to delete table with certain prefix via vba

    i m trying to scan thru the namemanager via vba macros and delete all tables with prefix "import" but i keep getting error sub or function not defined on dlookup

    Please Login or Register  to view this content.
    Last edited by littleangel; 09-05-2023 at 12:58 AM.

  2. #2
    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
    48,481

    Re: unable to delete table with certain prefix via vba

    If you are talking about Structured Tables, you can't delete the references in Name Manager. Those references are created when you insert a Table, and subsequently managed by Excel.

    Not really a case of what the names start with.

    You'd have to delete the table or convert the table back to a normal range.
    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


  3. #3
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: unable to delete table with certain prefix via vba


    Obviously the initial post code was not made under Excel ‼ Or wrong forum section ?
    The reason why copying / pasting can't be obviously coding …

  4. #4
    Registered User
    Join Date
    11-29-2020
    Location
    india
    MS-Off Ver
    2021
    Posts
    92

    Re: unable to delete table with certain prefix via vba

    the code was for a function i changed it for macros ,instead of sub if its function it gives no error but when its changed to sub it gives error....plz note..i m still a noob in vba and leaning from google

  5. #5
    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
    48,481

    Re: unable to delete table with certain prefix via vba

    Fast answers need visual help. Please read the yellow banner at the top of this page on how to attach a file and a mocked up solution.

    What are you trying to delete? The Reference to a Structure Table in Name Manager? The actual Structured Table? Or something else? Maybe something in Access?

  6. #6
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: unable to delete table with certain prefix via vba


    Quote Originally Posted by littleangel View Post
    the code was for a function i changed
    Again : here it's an Excel VBA forum but your code is obviously very not an Excel VBA code ‼

  7. #7
    Registered User
    Join Date
    11-29-2020
    Location
    india
    MS-Off Ver
    2021
    Posts
    92

    Re: unable to delete table with certain prefix via vba

    this code worked to delete name containing "import" from name manager

    Please Login or Register  to view this content.

+ 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. Delete entire row that contains specific prefix
    By paradise2sr in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-25-2023, 03:45 AM
  2. Unable to delete numbers in table
    By Deniouz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-15-2021, 09:06 AM
  3. [SOLVED] Unable to Delete Table Rows
    By omagoodness in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 12-27-2019, 04:53 PM
  4. [SOLVED] add prefix to number based on validation from other data if found prefix 0, do nothing
    By oeyandyprawira in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-12-2018, 11:52 AM
  5. [SOLVED] macro to delete prefix and file extension through desktop and its subfolders
    By JEAN1972 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-28-2018, 06:08 PM
  6. Delete cells based on Prefix
    By Will03 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-21-2014, 11:19 AM
  7. [SOLVED] Delete workbooks with specific prefix in its name
    By Manish84 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-27-2014, 06:07 PM

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