+ Reply to Thread
Results 1 to 11 of 11

WorkBook Open event for caption not working

  1. #1
    Forum Contributor
    Join Date
    02-13-2016
    Location
    MUMBAI
    MS-Off Ver
    Microsoft 365
    Posts
    167

    WorkBook Open event for caption not working

    Hii

    I want to have a caption to the workbook on opening the file. I used open workbook event with Application.caption but its not working for Thisworkbbok.

    However when I press ctrl+n for new workbbok the caption appears.. I don't know what's the issue & why such strange behavior.

    Please Help !!

    Sample excel file attached.

    Thanks.
    Attached Files Attached Files

  2. #2
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    2016 primarily
    Posts
    6,058

    Re: WorkBook Open event for caption not working

    I think it's just a timing issue. Try this:

    Please Login or Register  to view this content.
    Rory
    I drink, and I know things

  3. #3
    Forum Contributor
    Join Date
    02-13-2016
    Location
    MUMBAI
    MS-Off Ver
    Microsoft 365
    Posts
    167

    Re: WorkBook Open event for caption not working

    still the same issue...

    Whether the same issue coming to your end also?

  4. #4
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    2016 primarily
    Posts
    6,058

    Re: WorkBook Open event for caption not working

    It works fine for me with that change, but you might want to add a small delay to the OnTime. For example, to add a 1 second delay, you'd use Now + TimeSerial(0, 0, 1) instead of just Now

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2010
    Posts
    6,005

    Re: WorkBook Open event for caption not working

    It is working ok.
    On opening file after the fie name the caption in the title bar window is appearing.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  6. #6
    Forum Contributor
    Join Date
    02-13-2016
    Location
    MUMBAI
    MS-Off Ver
    Microsoft 365
    Posts
    167

    Re: WorkBook Open event for caption not working

    Its working fine on the server but not on my desktop..don't know why...are there any settings which needs to be changed on my desktop?

  7. #7
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    2016 primarily
    Posts
    6,058

    Re: WorkBook Open event for caption not working

    Your original didn't work for me in 2016 - I believe the caption did change but then got overwritten by Excel with the default after the workbook was opened. Adding a delay with OnTime should work - did you try that?

  8. #8
    Registered User
    Join Date
    09-02-2020
    Location
    USA
    MS-Off Ver
    2016
    Posts
    48

    Re: WorkBook Open event for caption not working

    Try
    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    02-13-2016
    Location
    MUMBAI
    MS-Off Ver
    Microsoft 365
    Posts
    167

    Re: WorkBook Open event for caption not working

    Quote Originally Posted by rorya View Post
    Your original didn't work for me in 2016 - I believe the caption did change but then got overwritten by Excel with the default after the workbook was opened. Adding a delay with OnTime should work - did you try that?
    Yes I tried the same but didn't work for me...

  10. #10
    Forum Contributor
    Join Date
    02-13-2016
    Location
    MUMBAI
    MS-Off Ver
    Microsoft 365
    Posts
    167

    Re: WorkBook Open event for caption not working

    Quote Originally Posted by ubludkisranye View Post
    Try
    Please Login or Register  to view this content.
    Yes this do work but it completely replaced the file name with the caption...I want filename (whatever it is - to be dynamic) & caption both to be displayed on the title bar.

  11. #11
    Forum Contributor
    Join Date
    02-13-2016
    Location
    MUMBAI
    MS-Off Ver
    Microsoft 365
    Posts
    167

    Re: WorkBook Open event for caption not working

    the query is solved with this code:

    Please Login or Register  to view this content.

+ 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 Open event - userform gets displayed over another workbook
    By hemantparmar in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-18-2019, 11:56 AM
  2. Workbook Open event
    By rajeev.raj in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-27-2019, 05:56 AM
  3. Work Open Event Not Working as Intended in Excel 2010
    By sx4vba in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-23-2015, 02:04 PM
  4. Workbook Open Event
    By cameron213 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-07-2013, 03:55 AM
  5. Open Workbook Event
    By newbie13 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-09-2008, 11:56 AM
  6. [SOLVED] Workbook open event
    By hans.domian@de.man-mn.com in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-11-2006, 06:00 AM
  7. Open Event not working
    By soundneedle@hotmail.com in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-22-2006, 02:50 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