OK, thanks Don.
Yesterday I hit two specific examples that seemed to make my question make sense as asked.
Possibly by chance I hit the exceptions to the rule.

Originally Posted by
xlnitwit
.... I am not sure that the VBA MsgBox function actually calls the MessageBox API function, ....
I am even more not surer .. I have no idea.. Only what I started reading and used in sone recent posts….
I referenced the posts.. here again the codes from those referenced Threads ….
_1 instead of message box , MsgBox , you call “MessageBoxA” – This article http://www.tek-tips.com/faqs.cfm?fid=4699 seemed to suggest it uses the “MessageBox API function” ( It makes the final seen message box pseudo not modal by not “locking” it to a window )
Option Explicit
Rem -2 MessageBoxA http://www.tek-tips.com/faqs.cfm?fid=4699 I am going to use a Windows , application programming interface, API, instead of using it via the VBA interface. The handle (a special identifier which uniquely identifies a window) of the Window which will own this message box.; if this is null, no window will own it. The returned number follows the rules here https://msdn.microsoft.com/en-us/vba/language-reference-vba/articles/msgbox-function. API are typically standard programs that other applications, such as Excel VBA can use. Windows API are typically shiped as standard with Windows.
Public Declare Function APIssinUserDLL_MsgBox Lib "user32" Alias "MessageBoxA" (Optional ByVal hWnd As Long, Optional ByVal Prompt As String, Optional ByVal Title As String, Optional ByVal buttons As Long) As Long '
Sub TestWndBreaks()
Dim Response As Long ' Long is very simple to handle, - final memory "size" type is known (123.456 and 000.001 have same "size" computer memory ) , and so a Address suggestion can be given for the next line when the variable is filled in. '( Long is a Big whole Number limit (-2,147,483,648 to 2,147,483,647) If you need some sort of validation the value should only be within the range of a Byte/Integer otherwise there's no point using anything but Long.--upon/after 32-bit, Integers (Short) need converted internally anyways, so a Long is actually faster. ) https://www.mrexcel.com/forum/excel-questions/803662-byte-backward-loop-4.html
Let Response = APIssinUserDLL_MsgBox(hWnd:=0, Prompt:="Pull my Finger?", Title:="NotModalMsgBox", buttons:=vbYesNo)
If Response = 6 Then Application.Speech.Speak "faarrrp" ' 6 is variable vbYes
End Sub
_.________________________________--
_2 That above did not work too well, or rather it worked well, but did not do what the OP wanted. So I found a solution involving the “scriptshell.popup”. ( That is a pop up message box that should close itself after a time which you can specify )
But that is full of Bugs , - There are loads of reports on that.. basically it is broke .. usually . It usually does not work. It usually fails to close itself.
This alternative does work. The impression I got was that it “bypasses the Excel Interface” and goes directly to the API thingy … or so I thought….. But once again , I confess I really don’t know what I am talking about. Unfortunately it is one of these subjects that no one seems to remember exactly what it is about or how it works. Possibly for that reason when these things break they never get fixed as no one can remember what they are..
This code works – it keeps telling you something until you acknowledge with a “Yes”
Option Explicit ' https://www.excelforum.com/excel-programming-vba-macros/1215431-speech-speak-with-message-box-and-a-reminder-every-2-minutes.html
Rem -2 Functions to use standard Window Libray stuff- Most fundamental Window Message box and the one to find a window number
Public Declare Function APIsinUserDLL_MsgBox Lib "user32.dll" Alias "MessageBoxTimeoutA" (Optional ByVal hWnd As Long, Optional ByVal Prompt As String, Optional ByVal Title As String, Optional ByVal uType As Long, Optional ByVal wLanguageID As Long, Optional ByVal Delay_ms As Long) As Long
'Public Declare Function FindWndNumber Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Dim RunyTime As Date
Public Sub JohnGetUp()
Rem 1 Tell him to get out of bed and, schedule theis pricedure to start again in a 5 seconds
Application.Speech.Speak "Hey John, Wake up and leave your Plonker alone. I have finished?", SpeakAsync:=False
' Set timer for next reminder
Let RunyTime = Now + TimeValue("00:00:05")
Application.OnTime EarliestTime:=RunyTime, Procedure:="JohnGetUp", Schedule:=True
Rem 2 ' I thought this might be Option for Modal .... but does not seem to have any effect...
Dim WndNumber As Long
'Dim WndName As String, WndClass As String ' "Pointer" to a "Blue Print" (or Form, Questionaire not yet filled in, a template etc.)"Pigeon Hole" in Memory, sufficient in construction to house a piece of Paper with code text giving the relevant information for the particular Variable Type. VBA is sent to it when it passes it. In a Routine it may be given a particular “Value”, or (“Values” for Objects). There instructions say then how to do that and handle(store) that(those). At Dim the created Paper is like a Blue Print that has some empty spaces not yet filled in. A String is a a bit tricky. The Blue Print code line Paper in the Pigeon Hole will allow to note the string Length and an Initial start memory Location. This Location well have to change frequently as strings of different length are assigned. Instructiions will tell how to do this. Theoretically a specilal value vbNullString is set to aid in quich checks.. But..http://www.mrexcel.com/forum/excel-questions/361246-vbnullstring-2.html#post44116
' Let WndNumber = FindWndNumber(lpClassName:=WndClass, lpWindowName:=WndName)
Rem 3 Give him a chance to acknowledge. If he does do then cancel the Timer
Dim Prmpt As String, CapshenTitle As String
Let Prmpt = "Acknowledge with Yes you Wonker, or I will keep saying rude things": Let CapshenTitle = "NonModalRepeatingPopUpThingy"
Dim Response As Long ' Long is very simple to handle, - final memory "size" type is known (123.456 and 000.001 have same "size" computer memory ) , and so a Address suggestion can be given for the next line when the variable is filled in. '( Long is a Big whole Number limit (-2,147,483,648 to 2,147,483,647) If you need some sort of validation the value should only be within the range of a Byte/Integer otherwise there's no point using anything but Long.--upon/after 32-bit, Integers (Short) need converted internally anyways, so a Long is actually faster. ) https://www.mrexcel.com/forum/excel-questions/803662-byte-backward-loop-4.html
Let Response = APIsinUserDLL_MsgBox(hWnd:=WndNumber, Prompt:=Prmpt, Title:=CapshenTitle, uType:=4, wLanguageID:=0, Delay_ms:=5000)
If Response = 6 Then Call CancelTimers ' vbYes=6
End Sub
Public Sub CancelTimers() ' JeffJazz https://www.excelforum.com/excel-programming-vba-macros/1215431-speech-speak-with-message-box-and-a-reminder-every-2-minutes.html#post4820382 Hans http://www.eileenslounge.com/viewtopic.php?f=27&t=25140#p195883
Application.OnTime EarliestTime:=RunyTime, Procedure:="JohnGetUp", Schedule:=False
End Sub
_.____________________
I expect I may need to ask around a lot and make a list from collecting the “Excel VBA Function Method API Windows Function User32.dll Alias Declare Library” things that they use.
What ever they are , it looks like it might be something useful. I note what you said about

Originally Posted by
xlnitwit
... When you get them wrong, Excel is liable to terminate with no warning at all- and that is if you are lucky....
.. I will need to be careful. …But I am feeling a bit adventurous just now ….( I copied some Excel 2010 library program files to my Excel 2007 program files this morning… It broke everything, … but I managed to fix it…
)
_._______________________________-

Originally Posted by
xlnitwit
4. There is no Inputbox API call that I have ever seen.
Possibly that might be why they call it the Application.Input Box …. But there also is a Input Box …. So who knows …… not me… yet…
Bookmarks