+ Reply to Thread
Results 1 to 9 of 9

Is it possible to use wildcard in VBA?

  1. #1
    Forum Contributor
    Join Date
    08-29-2017
    Location
    London England
    MS-Off Ver
    2016
    Posts
    194

    Is it possible to use wildcard in VBA?

    Hi all,

    I have a Workbook_Open code, which I would like to "Knock Out" with the following line sometimes...

    Please Login or Register  to view this content.
    but obviously the file name has a date in it which changes..

    Is it possible to do a wildcard thing to ovecome this?

    (Its part of a big project, involving a save as - under a different name and stripping the sheets the Workbook_Open refers to, hence the KO line)

    Thanks!

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: Is it possible to use wildcard in VBA?

    Like operator with wildcard.
    e.g
    Please Login or Register  to view this content.
    # represents numeric character 0-9.

  3. #3
    Forum Contributor
    Join Date
    08-29-2017
    Location
    London England
    MS-Off Ver
    2016
    Posts
    194

    Re: Is it possible to use wildcard in VBA?

    Oh Magic! Thank you very much

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: Is it possible to use wildcard in VBA?

    You are welcome and thank for the rep.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  5. #5
    Forum Contributor
    Join Date
    08-29-2017
    Location
    London England
    MS-Off Ver
    2016
    Posts
    194

    Re: Is it possible to use wildcard in VBA?

    Same question different syntax, is it possible to use the Wildcard in this code somehow?

    Please Login or Register  to view this content.
    After copying the tables (from an original one that I also keep) to different sheets the numbers appear behind the table names... how can I use wildcard instead of the actual numbers?

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

    Re: Is it possible to use wildcard in VBA?

    If there is only one Table on sheet use...
    Please Login or Register  to view this content.
    Last edited by sintek; 05-24-2019 at 06:20 AM.
    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!!!

  7. #7
    Forum Contributor
    Join Date
    08-29-2017
    Location
    London England
    MS-Off Ver
    2016
    Posts
    194

    Re: Is it possible to use wildcard in VBA?

    No there are more tables.

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: Is it possible to use wildcard in VBA?

    You need to loop to find the name like
    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    08-29-2017
    Location
    London England
    MS-Off Ver
    2016
    Posts
    194

    Re: Is it possible to use wildcard in VBA?

    Thank you that worked!

+ 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. VBA wildcard help
    By tfagan1978 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-12-2017, 10:43 AM
  2. Find Wildcard, return that Wildcard value?
    By help_me_im_lost in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-08-2014, 01:20 PM
  3. [SOLVED] Find: Using wildcard, but don't replace with wildcard
    By JimDandy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-06-2013, 05:39 PM
  4. [SOLVED] Using 'Name ..... As .....' with a wildcard
    By Iwasiw35 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-05-2012, 09:46 PM
  5. [SOLVED] wildcard
    By JOUIOUI in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-31-2006, 08:53 AM
  6. Wildcard
    By Robert in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-18-2006, 08:35 AM
  7. [SOLVED] sum if wildcard
    By Marcel in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 04-30-2006, 06:30 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