+ Reply to Thread
Results 1 to 17 of 17

MsgBox Message - Where Is It Coming From ??

  1. #1
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    MsgBox Message - Where Is It Coming From ??

    .
    In this thread : https://www.excelforum.com/excel-pro...ml#post5114983

    When the user enters anything into a cell, the msgbox appears and displays "Typing (whatever was entered into the cell) in (the cell ID) ".

    The code that produces this result is listed below. I am unable to understand how Excel knows to create the message in the msgbox. I can't find anything in the workbook that
    identifies the statement.

    What am I missing ?????


    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    09-19-2008
    Location
    It varies ...
    MS-Off Ver
    Office365 - 64bit
    Posts
    862

    Re: MsgBox Message - Where Is It Coming From ??

    I'm sure I'm misunderstanding your issue ...
    I am unable to understand how Excel knows to create the message in the msgbox.
    There is a message box call ...
    Please Login or Register  to view this content.
    What am I missing?!
    MatrixMan.
    --------------------------------------
    If this - or any - reply helps you, remember to say thanks by clicking on *Add Reputation.
    If your issue is now resolved, remember to mark as solved - click Thread Tools at top right of thread.

  3. #3
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,210

    Re: MsgBox Message - Where Is It Coming From ??

    Perhaps the action is stored in the registry and this statement declared as a string type calls that action...
    Please Login or Register  to view this content.
    By default, Microsoft Excel keeps track of 16 "undo" levels. Undo levels provide an undo history for most actions that you perform in Excel. You can change the number of undo levels by adding an entry in the Microsoft Windows registry. Note We recommend that you do not increase the number of undo levels beyond 100.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  4. #4
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: MsgBox Message - Where Is It Coming From ??

    .
    MatrixMan

    What defines "WhatExcelDid" ?

    I understand the msgbox is getting the information from that term, but where is the term defined in the workbook ?

    I searched the internet to see, just in case, if the term WhatExcelDid is some kind of "secret" gem hidden within Excel that isn't well advertised.
    Apparently it is not.

    So, when the code tells the MsgBox to display WhatExcelDid ... how does it know to display: "Typing (whatever was entered into the cell) in (the cell ID) "


    sintek

    Thank you for your response. Your idea is a possibility I hadn't considered.

  5. #5
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,210

    Re: MsgBox Message - Where Is It Coming From ??

    Thank you for your response. Your idea is a possibility I hadn't considered.
    AS excel application is set to specific # undo actions...These actions then must be stored in the registry...No other way...

  6. #6
    Valued Forum Contributor
    Join Date
    09-19-2008
    Location
    It varies ...
    MS-Off Ver
    Office365 - 64bit
    Posts
    862

    Re: MsgBox Message - Where Is It Coming From ??

    It's right above it ...
    Please Login or Register  to view this content.

  7. #7
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: MsgBox Message - Where Is It Coming From ??

    .
    Ok ... now how does that ( Application.CommandBars("Standard").Controls("&Undo").List(1) ) translate to "Typing (whatever was entered into the cell) in (the cell ID) "

    Being pretty much unfamiliar with the intricacies of the Registry (other than settings are stored there) ... is "Typing (whatever was entered into the cell) in (the cell ID) " what is actually entered into the Registry so Excel
    knows what to go back to for an UNDO ?

    Perhaps this description better describes my confusion : If I want to create a msgbox using variables it might look like : MsgBox "Typing" & stringEntered & " in" & cellloc

    The command : "Application.CommandBars("Standard").Controls("&Undo").List(1)" mentions a .List(1) . Normally I would look for a list of terms somewhere in the sheet or in the macro itself. Finding none .... ????

    So with the previous info given by respondents .... is there an actual "list" that Excel is referencing somewhere to get the wording for the MsgBox ? Is it stored in the Registry, deep within the bowels of Excel or ????

    Please accept my apologies for what probably appears to be 'beating a dead horse' ..... as I really want to understand the process of what Excel / VBA is doing in this circumstance.
    Last edited by Logit; 05-05-2019 at 02:20 PM.

  8. #8
    Valued Forum Contributor
    Join Date
    09-19-2008
    Location
    It varies ...
    MS-Off Ver
    Office365 - 64bit
    Posts
    862

    Re: MsgBox Message - Where Is It Coming From ??

    Yes exactly. Open excel, type something in a cell then hover over the undo button

    And yes, the list is in the registry: https://support.microsoft.com/en-us/...evels-in-excel
    Last edited by MatrixMan; 05-05-2019 at 02:56 PM.

  9. #9
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: MsgBox Message - Where Is It Coming From ??

    Quote Originally Posted by sintek View Post
    These actions then must be stored in the registry...No other way...
    I don't think so; I think it's a stack maintained in the current Excel session.
    Entia non sunt multiplicanda sine necessitate

  10. #10
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,210

    Re: MsgBox Message - Where Is It Coming From ??

    I think it's a stack maintained in the current Excel session
    Please be so kind and elaborate shg...Undo stack?
    Last edited by sintek; 05-05-2019 at 03:15 PM.

  11. #11
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: MsgBox Message - Where Is It Coming From ??

    Dunno what else to say. Why do you think it must be in the registry?

  12. #12
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,210

    Re: MsgBox Message - Where Is It Coming From ??

    Def don't have an idea...was also trolling the web to find out...Undo stack is all I could find...
    https://excel.tips.net/T002060_Prese...Undo_List.html
    https://excelribbon.tips.net/T002082..._Workbook.html
    Excel Memory Stack. Excel uses a portion of the computer's RAM to maintain a list (often called a stack) of recent changes made to a worksheet. The undo/redo combination of commands allows you to move forward and backward through the stack to remove or re-apply those changes in the order they were first made
    I agree with Peter on this. Whatever action that you perform in Excel Spreadsheet is stored in a list which is called the Undo List. So when you do an Undo for the first time, Excel refers to this list and then Undoes the last action that you performed. Also if you want to get the Undo list then you can use this as well
    Please Login or Register  to view this content.
    Last edited by sintek; 05-05-2019 at 03:24 PM.

  13. #13
    Valued Forum Contributor
    Join Date
    09-19-2008
    Location
    It varies ...
    MS-Off Ver
    Office365 - 64bit
    Posts
    862

    Re: MsgBox Message - Where Is It Coming From ??

    Ah yes ... my mistake ... the setting for how many actions to keep is in the registry, but it seems the actual actions are in a stack in Excel.

  14. #14
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: MsgBox Message - Where Is It Coming From ??

    .
    MatrixMan

    Ah Ha ! Thank you for that insight of the UNDO button. Makes a little more sense now. The last bit of info
    would be is the wording for the MsgBox in the Registry or somewhere else.

    Gives me something else to search the Internet for.


    This article indicates the UNDO history is stored in memory : https://support.microsoft.com/en-us/...evels-in-excel

    Now where is the wording stored ...

    Ooops .. this author seems to indicate the UNDO list is maintained somewhere like a file : https://www.online-tech-tips.com/ms-...nges-in-excel/
    Last edited by Logit; 05-05-2019 at 04:14 PM.

  15. #15
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: MsgBox Message - Where Is It Coming From ??

    .
    And our own Rick Rothstein, along with others, have indicated the Undo List is maintained in the Stack :

    https://answers.microsoft.com/en-us/...e-c2cf18f0bb1d


    So ... I'm going with the Stack (even if its a wrong choice).

    But I'd still like to know where the MsgBox gets it's wording from.

  16. #16
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: MsgBox Message - Where Is It Coming From ??

    .
    Ok .. since this is Sunday afternoon .. not much going on .. I'm bored (and some would say boring ((thanks)) ) .... I searched the Registry for UNDO.

    I found only one entry relating to MS Office :

    Please Login or Register  to view this content.
    Looking at a decompiled version of the .DLL, it does reference the following :

    Does reference MS Office current version
    Does reference Disaster Recovery

    But doesn't explicitly mention UNDO or TYPING.
    Last edited by Logit; 05-05-2019 at 06:01 PM.

  17. #17
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: MsgBox Message - Where Is It Coming From ??

    I think there is no registry entry unless you add one ("UndoHistory") in HKEY_CURRENT_USER\Software\Microsoft\Office\xx.0\Excel\Options to change from Excel's default of 16 levels.

+ 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] Excell to Outlook mail VBA - Message Body 1 coming different font and size.
    By rajeshn_in in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-10-2017, 03:16 PM
  2. If user doesn't open file...avoid from the Debug message coming up
    By swade730 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-12-2015, 02:18 PM
  3. MsgBox that has a message that comes from a dynamic cell (it changes)
    By mjal13 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-10-2014, 10:36 AM
  4. [SOLVED] message about probloem with workbook links keeps coming up. Help?
    By mccartneyd1795 in forum Excel General
    Replies: 2
    Last Post: 08-27-2014, 10:32 AM
  5. Every Error Message from VBA is coming back as "Out of Memory", while it is not!
    By TopXorGuy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-30-2013, 10:57 PM
  6. Values not coming in few cell but coming in rest all cells
    By rashmib in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-02-2009, 11:19 AM
  7. MsgBox-center the message on a msgbox
    By CobraLAD in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-11-2007, 06:48 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