+ Reply to Thread
Results 1 to 4 of 4

VBA IF Statement: IF table in sheet is called THEN....

  1. #1
    Registered User
    Join Date
    10-27-2012
    Location
    Uk
    MS-Off Ver
    Excel 2010
    Posts
    98

    Question VBA IF Statement: IF table in sheet is called THEN....

    Hi All

    I'm doing a bit of data validation and would like to prevent the user from running a macro if the table name is not correct on sheet1.

    Sheet1 only contains 1 table and it must be named 'thebesttable' before they continue

    I've tried to modify the code from here
    https://stackoverflow.com/questions/...ing-table-name

    Please Login or Register  to view this content.
    But I'm getting the following error

    VBA Error.png

    Any advice appreciated
    All the best
    Vicky

  2. #2
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,122

    Re: VBA IF Statement: IF table in sheet is called THEN....

    Try...
    Please Login or Register  to view this content.
    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 star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  3. #3
    Registered User
    Join Date
    10-27-2012
    Location
    Uk
    MS-Off Ver
    Excel 2010
    Posts
    98

    Re: VBA IF Statement: IF table in sheet is called THEN....

    Works perfectly thank you

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,122

    Re: VBA IF Statement: IF table in sheet is called THEN....

    Glad I could contribute...

+ 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] If sheet exists called Sheet* then delete
    By nickmax1 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-06-2016, 08:31 AM
  2. VBA Function not called from sheet
    By cdikland in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-19-2015, 12:51 PM
  3. Pivot Table Cell DrillDown called from another sheet.
    By ianross in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-14-2015, 01:05 PM
  4. Another if condition (Maybe it called nested if statement!!)
    By Emma_B in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-18-2013, 08:02 AM
  5. Replies: 0
    Last Post: 08-08-2012, 10:20 AM
  6. range being called from another sheet
    By chileno in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-25-2010, 03:40 AM
  7. [SOLVED] mystery function called 'TABLE'
    By SongBear in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-07-2005, 01:06 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