Using example below, i want my code that will open a msgbox that contain string from txt file.
I try something like this, not working. Someone can help fixing it?
Code:
Option Explicit
Dim wsh : Set wsh = CreateObject("Wscript.Shell")
'Message boxes that don't wait for a return to continue. No return values.
MsgBlank "tetttedghdhbcccc", "title"
'Functions for simple no wait message boxes without return values.
Function MsgBlank(m, t)
wsh.Run "mshta.exe vbscript:Execute(MsgBox(""" & m _
& """, vbOkOnly, """ & t & """)(window.close))"
End Function
I try something like this, not working. Someone can help fixing it?
Code:
Option Explicit
Dim wsh : Set wsh = CreateObject("Wscript.Shell")
'Message boxes that don't wait for a return to continue. No return values.
Dim fso
Dim file
Dim content
Set fso = CreateObject("Scripting.FileSystemObject")
Set file = fso.OpenTextFile ("c:\List.txt", 1)
content = file.ReadAll
file.Close
MsgInformation content, "title"
'Functions for simple no wait message boxes without return values.
Function MsgInformation(m, t)
wsh.Run "mshta.exe vbscript:Execute(MsgBox("""&m&""",vbInformation,"""&t&""")(window.close))"
End Function