Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Option Explicit
Const SW_NORMAL As Long = 1
Const SW_MINIMIZE As Long = 6
Declare Function FindWindow& Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String)
Declare Function ShowWindowAsync& Lib "user32" _
(ByVal hwnd As Long, ByVal nCmdShow As Long)
Sub ActivateOtherWorkbook(WorkbookName As String)
Dim hw&
hw& = FindWindow(vbNullString, "Microsoft Excel - " & WorkbookName)
If hw& = 0 Then
hw& = FindWindow(vbNullString, "Microsoft Excel")
End If
ShowWindowAsync hw&, SW_MINIMIZE
ShowWindowAsync hw&, SW_NORMAL
End Sub
Sub test()
ActivateOtherWorkbook ("New Text Document.txt")
End Sub