+ Reply to Thread
Results 1 to 6 of 6

Windows Wildcard Activate

  1. #1
    Forum Contributor Pierce Quality's Avatar
    Join Date
    07-29-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    221

    Windows Wildcard Activate

    Hi All, I have an issue with the Windows.Activate property.
    I have a macro that vertically splits the view into two windows for the user, and the problem is the specific workbook reference in the syntax.
    Here is what I have so far:
    Please Login or Register  to view this content.
    The name of this workbook will change and therfore throw up a reference error, so I was wondering if someone could point me in the right direction. I can't quite figure out how to reference wb1 in the Windows.Activate property.

    Thanks!

  2. #2
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Windows Wildcard Activate

    If you open them in a specific order them reference the Index property.
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor Pierce Quality's Avatar
    Join Date
    07-29-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    221

    Re: Windows Wildcard Activate

    Thanks pj, thats a good suggestion, but the end user will already have at least one other workbook open before the macro is ran, so the Index number would be variable.

    Thanks

  4. #4
    Forum Contributor Pierce Quality's Avatar
    Join Date
    07-29-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    221

    Re: Windows Wildcard Activate

    Update:
    Haven't come across a solution so far, so in the meantime I've added a bit of code to exit the sub if the workbook name is changed:
    Please Login or Register  to view this content.
    Hopefully a solution is possible, but if not, this way there won't be any errors.

  5. #5
    Forum Contributor Pierce Quality's Avatar
    Join Date
    07-29-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    221

    Re: Windows Wildcard Activate

    Bumping along.

  6. #6
    Forum Contributor Pierce Quality's Avatar
    Join Date
    07-29-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    221

    Re: Windows Wildcard Activate

    Update: Ended up finding a solution by using the windows index number. This also solves the problem of having multiple workbooks open, as it will exit the sub if that condition exists

    Please Login or Register  to view this content.
    Marking this as solved.
    Thanks

+ 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] Wildcard text to activate workbooks name
    By Faridwahidi in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-03-2014, 02:38 AM
  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

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