msgbox design RRS feed

All replies

  • Hi,

    1. Can we call system msgbox in excel ?

    2. Can we design msgbox in excel ?



    1. Not sure what you mean with "system" msgbox. Please explain a bit more.

    2. Yes you can create a custom msgbox, there are numerous examples you can find, see an example in below link.

    Creating a Custom Dialog Box

    Hope this helps,

    Daniel van den Berg | Washington, USA | "Anticipate the difficult by managing the easy"

    Please vote an answer helpful if they helped. Please mark an answer(s) as an answer when your question is being answered.

    Thursday, November 27, 2014 12:25 AM
  • Hi,

    Thank you danishani,

    1. I mean msgbox for alert or pop up message box. System msgbox, I mean message box from system, system start up. Any code in excel which can initiate a msgbox from system at start up.  

    2. I did not mean for userform. I mean Msgbox alert.

    What is difference between "kernel32" and “kernel32″ ?  My vb environment in excel makes the “kernel32″ red, I copy pasted it from other source."kernel32" is with normal color.

    Please see this image and rectify the red lines.



    • Edited by dockhem2 Thursday, November 27, 2014 3:19 AM
    Thursday, November 27, 2014 3:06 AM
  • because “kernel32″ uses a not recognized type of quotation. so you need to replace it with " "
    Thursday, November 27, 2014 7:19 AM
  • Hi DelaCruzPrince,

    you see there it is now recognized. Actually when I copy pasted it did not work. When I typed it worked.

    But these red lines are not working even after typing ?



    Thursday, November 27, 2014 11:53 AM
  • Re:  Msgbox code

    Run the following Sub...
    Sub ShowMeTheBox()
      MsgBox ""
      MsgBox "Vote for Sludge"
      MsgBox "Vote for Sludge to Get Free Stuff ", vbInformation
      MsgBox "A Vote for Sludge is Expensive  ", vbCritical, "Free Stuff"
    End Sub

    Re:  API calls
    Private Declare Function MessageBox Lib "user32.dll" Alias "MessageBoxA" (ByVal hwnd As Long, ByVal lpText As String, ByVal lpCaption As String, ByVal wType As Long) As Long

    Private Declare Function UnhookWindowsHook Lib "user32.dll" (ByVal nCode As Long, ByVal pfnFilterProc As Long) As Long
    Jim Cone
    Portland, Oregon USA (Dropbox)
    (free & commercial excel add-ins & workbooks)

    Thursday, November 27, 2014 2:13 PM