+ Reply to Thread
Results 1 to 2 of 2

Activate Workbook, when workbook name is changing.

  1. #1
    Registered User
    Join Date
    01-24-2019
    Location
    Netherlands
    MS-Off Ver
    2016
    Posts
    2

    Activate Workbook, when workbook name is changing.

    I There,

    I have a excel workbook(Workbook1)(XLSM) and it working good for making pdf files. Made search box where i can search for people there name etc from an sheet and create pdf files.
    I have made this by using a form, the problem is most of the time i have to open another(workbook2) excel files. Then that(workbook2) file comes active, when i want to use Workbook1(form) again i got an error because workbook1 is not active anymore.

    I know when i selected workbook1 each time before using the form it works, but this is not handy.

    When i add the code: Workbooks("Workbook1.xlsm).Activate in the form is solves the problem, but the problem is each time if i have made an update the name will change for example to
    Workbook1.1.xlsm.

    Does any know a way to fix this?

    So hopefully somebody can help me out.

    Already thanks.

    Wilco,

  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,374

    Re: Activate Workbook, when workbook name is changing.

    The workbook with the code in it can be referred to as ThisWorkbook
    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


+ 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. Workbook.Activate not firing when workbook opens
    By fbxiii in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-05-2018, 10:08 AM
  2. Activate open workbook from range in another workbook
    By Declamatory in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-08-2016, 10:28 AM
  3. [SOLVED] Activate Workbook with Changing Filename
    By ktennies in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 06-17-2013, 03:22 PM
  4. [SOLVED] Activate unsaved workbook from another workbook
    By klallen810 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-17-2013, 12:31 PM
  5. [SOLVED] Change activate workbook to be vba created workbook
    By timtim89 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-18-2012, 09:24 AM
  6. [SOLVED] Workbook.Activate / Window.Activate problem
    By Tim in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-03-2006, 07:40 PM
  7. Replies: 2
    Last Post: 03-21-2005, 08:06 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