I need a msgbox that does not stop the macro. Is there a way to insert a break line, same as 'vbNewLine' for msgbox?
None of these works:
Chr(13)
Chr(10)
vbLf
vbCr
vbCrLf
vbNewLine
"<br>"
Function mshta(ByVal MessageText As String, Optional ByVal Title As String, Optional ByVal PauseTimeSeconds As Integer)
'mshta.exe as an alternative for msgbox
'[...] some other stuff
Dim ConfigString As String
Set WScriptShell = CreateObject("WScript.Shell")
ConfigString = "mshta.exe vbscript:close(CreateObject(""WScript.Shell"")." & "Popup(""" & MessageText & """," & PauseTimeSeconds & ",""" & Title & """))"
WScriptShell.Run ConfigString
End Function
If I cal the function:
mshta "Hello<magic?>World"
I want it to display:
Hello
World
See Question&Answers more detail:os