+ Reply to Thread
Results 1 to 5 of 5

Wildcard text to activate workbooks name

  1. #1
    Valued Forum Contributor
    Join Date
    03-28-2014
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    Excel 2016
    Posts
    696

    Wildcard text to activate workbooks name

    Hi,

    Can anyone help me on how to change it to wildcard text in order to activate workbook.

    the code below not working
    Please Login or Register  to view this content.
    Last edited by Faridwahidi; 11-03-2014 at 12:45 AM.

  2. #2
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Wildcard text to activate workbooks name

    Assign Full Name of workbook

    remove * from name and then try.

    Please Login or Register  to view this content.
    Thanks - Naveed
    -----------------------------
    If the suggestion helps you, then Click * to Add Reputation
    To Attach File: Go Advanced>>Manage Attachments>>Add Files (In Top Right Corner)>>SelectFiles>>.........Locate Your File(s)>>Upload Files>>Done (In Bottom Right)
    1. Use [code] code tags [\code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    2. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Wildcard text to activate workbooks name

    Hello Faridwahidi,

    You can find the first workbook in the current directory by using the Dir method.

    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Wildcard text to activate workbooks name

    Hi, Farid,

    if the workbook is open loop through the workbooks of the instance and use InStr or Like to compare the part of the name and assign a variable to the workbook, if you open the workbook set a variable to it by opening. I doubt that you should be able to activate a certain sheet in a different workbook in a one-liner code.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  5. #5
    Valued Forum Contributor
    Join Date
    03-28-2014
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: Wildcard text to activate workbooks name

    Hi Holger,

    Thanks for a very good advise. I have resolved it.

    Please Login or Register  to view this content.
    @ Leith,

    Thanks a lot
    Last edited by Faridwahidi; 11-03-2014 at 02:40 AM.

+ 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] How to code a macro to activate a workbook with a wildcard in the title
    By processcker in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 09-12-2013, 03:25 PM
  2. activate and copy open workbook using a wildcard
    By sammar12 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-25-2012, 12:32 PM
  3. Activate Workbook Using Wildcard
    By contra76 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-31-2010, 05:10 PM
  4. Activate worksheet using wildcard
    By contra76 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-25-2010, 02:19 PM
  5. Copy Data between two workbooks (Wildcard windows().Activate)
    By gfishman in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-12-2010, 02:20 PM

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