Skip to content

Instantly share code, notes, and snippets.

@TuanIPC
Created July 11, 2021 11:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TuanIPC/58ffc8084f24af57c6edd6aa82fe3982 to your computer and use it in GitHub Desktop.
Save TuanIPC/58ffc8084f24af57c6edd6aa82fe3982 to your computer and use it in GitHub Desktop.
Private Const WM_SETTEXT = &HC
#If Win64 Then
Private Declare PtrSafe Function DefWindowProcW Lib "user32" (ByVal HWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As LongPtr) As Long
Private Declare PtrSafe Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
#Else
Private Declare Function DefWindowProcW Lib "user32" (ByVal HWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As LongPtr) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
#End If
Private Sub UserForm_Initialize()
Dim HWnd&
HWnd = FindWindow("ThunderDFrame", Caption)
DefWindowProcW HWnd, WM_SETTEXT, 0, StrPtr("Ti" & ChrW(234) & "u " & ChrW(273) & ChrW(7873) & " Ti" & ChrW(7871) & "ng Vi" & ChrW(7879) & "t")
Frame1.Caption = "H" & ChrW(7885) & "c Excel Online - Frame Ti" & ChrW(7871) & "ng Vi" & ChrW(7879) & "t"
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment