Resize_Me2 + Resize_Me3

Resizes Excel window to certain small size and location (hard-coded) and hide ribbon and all toolbars.
Use Resize_Me2 to save current Excel window location and sizes into settings then change location and size to certain parameters.
Use Resize_Me3 to restore to original location and size (Reading settings)
Used in one of my daily workbooks to import images from Internet (Moclif v5.8)

Ribbon hide and show macro uses ExecuteExcel4Macro as a workaround.
Worked in Excel 365 in Windows 10 as of today

What is this?



Original Work
Sub Resize_Me2()
    Application.ScreenUpdating = False
    If Application.WindowState = xlMaximized Then Application.WindowState = xlNormal
    If Application.Top = 148.8 And Application.Height = 549.6 Then
        Application.Top = SettingRead("App1_Top")
        Application.Left = SettingRead("App2_Left")
        Application.Width = SettingRead("App3_Width")
        Application.Height = SettingRead("App4_Height")
    End If
    Application.ExecuteExcel4Macro "Show.ToolBar(""Ribbon"", True)"
    Application.ScreenUpdating = True
End Sub
Sub Resize_Me3()
    ' Resizes workbook for user to work with DeviantArt sheet
    Application.ScreenUpdating = False
    If Application.WindowState = xlMaximized Then Application.WindowState = xlNormal
    SettingSave "App1_Top", Application.Top
    SettingSave "App2_Left", Application.Left
    SettingSave "App3_Width", Application.Width
    SettingSave "App4_Height", Application.Height
    Application.Top = 150 '250
    Application.Left = 180
    Application.Width = 412 '900
    Application.Height = 550
    Application.ExecuteExcel4Macro "Show.ToolBar(""Ribbon"", False)"
    Application.ScreenUpdating = True
End Sub

Views 744

Downloads 272