I think this is a cool way to get Unicode InputBox:
Code:Public Function InputBoxW(Prompt, title, Optional Default = "") As String Dim sc Dim s Dim p As String Dim v As String Set sc = CreateObject("MSScriptControl.ScriptControl") sc.Language = "VBScript" p = Prompt: GoSub jConcat p = title: GoSub jConcat p = Default: GoSub jConcat s = sc.Eval("InputBox(" & v & ")") If IsEmpty(s) Then s = vbNullString Else If Len(s) = 0 Then s = "" InputBoxW = s Exit Function jConcat: If v <> "" Then v = v & "," If InStr(1, p, """") Then p = Replace(p, """", """""") If InStr(1, p, vbCrLf) Then p = Replace(p, vbCrLf, """ & vbNewLine & """) If InStr(1, p, vbLf) Then p = Replace(p, vbLf, """ & vbNewLine & """) v = v & ("""" & p & """") Return End Function




Reply With Quote