+ Reply to Thread
Results 1 to 8 of 8

Yellow message bar

  1. #1
    Registered User
    Join Date
    06-25-2015
    Location
    Toronto
    MS-Off Ver
    2013
    Posts
    43

    Yellow message bar

    Hi everyone.

    Sometimes there is yellow message bar below Excel toolbar.
    How to get the access to this message bar from AddIn dll.
    Is there a pointer like Excel::_MessageBarPtr, as well as Excel::_WorksheetPtr ?

    ExcelYellowBar2.png
    ExcelYellowBar.png

  2. #2
    Forum Contributor S O's Avatar
    Join Date
    06-25-2015
    Location
    England
    MS-Off Ver
    Office 2010 + 2013 + 2016
    Posts
    103

    Re: Yellow message bar

    That message bar is in windows explorer, not excel... Do you mean the "Protected View" or "Enable Macros" prompts?

  3. #3
    Registered User
    Join Date
    06-25-2015
    Location
    Toronto
    MS-Off Ver
    2013
    Posts
    43

    Re: Yellow message bar

    Hi S O,
    You have good eyes.
    "Protected View" is quit like what I am looking for. Is there a way to get the access to "Protected View" prompt?
    I need to post messages to "Protected View" prompt, and get user's response via this prompt.

    By the way, where may I find any Excel Programming Docs or class manuals?

    Thanks,
    Last edited by neu_stone; 06-25-2015 at 11:11 PM.

  4. #4
    Forum Contributor S O's Avatar
    Join Date
    06-25-2015
    Location
    England
    MS-Off Ver
    Office 2010 + 2013 + 2016
    Posts
    103

    Re: Yellow message bar

    Even if there was a way (which I don't think there is) - those prompts would disable any VBA from running so you wouldn't be able to get a handle on them anyway.

    What is the purpose here? May be worth going down the VSTO route instead.

  5. #5
    Registered User
    Join Date
    06-25-2015
    Location
    Toronto
    MS-Off Ver
    2013
    Posts
    43

    Re: Yellow message bar

    Hi SO,
    Attached is the message bar which I would like to communicate with. Is it "Protected View" Window ?

    My friend is using AfxMessageBox to ask user's selection. This will block working thread.
    My idea is to use message bar showing warnings and options without blocking the thread.

    I found an API:
    Excel::ProtectedViewWindowPtr pWnd = m_pAppExcel->GetProtectedViewWindows();
    But pWnd is always nullptr. How to create this wnd ?

    Thanks,

    ExcelYellowBar3.png

  6. #6
    Forum Contributor S O's Avatar
    Join Date
    06-25-2015
    Location
    England
    MS-Off Ver
    Office 2010 + 2013 + 2016
    Posts
    103

    Re: Yellow message bar

    What are you using? C++?

  7. #7
    Registered User
    Join Date
    06-25-2015
    Location
    Toronto
    MS-Off Ver
    2013
    Posts
    43

    Re: Yellow message bar

    Yes, I am using C++/MFC.

  8. #8
    Registered User
    Join Date
    06-25-2015
    Location
    Toronto
    MS-Off Ver
    2013
    Posts
    43

    Re: Yellow message bar

    I found how to get dialogs:

    Excel::DialogsPtr pDlgs = m_pAppExcel->GetDialogs();
    long lNumOfDlgs = pDlgs->GetCount();
    Excel::DialogPtr pDlg = pDlgs->GetItem(Excel::xlDialogProtectDocument);

    I also found how to get MenuBars:

    Excel::MenuBarsPtr pMenuBars = m_pAppExcel->GetMenuBars();
    long lCountOfMenubars = pMenuBars->GetCount();
    Excel::MenuBarPtr pMenuBar = pMenuBars->GetItem(lIndex);

    But still there is no idea of neither ProtectedView nor MessageBar. Might consider to create a modeless dialog by myself to do my job.

+ 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. Yellow
    By Etattherat in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 10-03-2014, 06:01 PM
  2. [SOLVED] Highlight Yellow Active Row, PROBLEM: row selected before closing stays yellow
    By NumberCruncher311 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-12-2013, 07:01 PM
  3. yellow all
    By kris.ball in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 06-21-2012, 10:55 AM
  4. Yellow pop-up message in cell
    By Brw in forum Excel General
    Replies: 2
    Last Post: 12-21-2005, 11:10 AM
  5. [SOLVED] formula for if Cell c1 is yellow shaded cell d1 should be yellow
    By Hardeep in forum Excel General
    Replies: 1
    Last Post: 10-27-2005, 10:05 AM

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