[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

VBA Code to change XL interface



PureBytes Links

Trading Reference Links

Thanks for your emails

This code from page 256 of the "Excel 97 Developer's Handbook" will
demonstrate many of the the changes that you can make to the interface. The
book spends about 400 pages telling you how to create your own interface,
app and support pages. (plus all the code you need is on the CD)

You can find the code to change the XL icon in the upper left corner, in the
Excel-L List archives. I think that I would prefer "Calvin" from Calvin and
Hobbs. <G>

Best regards

Walter

================================

Sub FormatWorksheet()
    Dim oldCaption As String
    Worksheets(1).Activate
    With ActiveWindow
        .DisplayGridlines = False
        MsgBox "ActiveWindow.DisplayGridlines = False"
        .DisplayHeadings = False
        MsgBox "ActiveWindow.DisplayHeadings = False"
        oldCaption = .Caption
        .Caption = "Application File"
        MsgBox "ActiveWindow.Caption = ""Application File"""
        .DisplayHorizontalScrollBar = False
        MsgBox "ActiveWindow.DisplayHorizontalScrollBar = False"
        .DisplayVerticalScrollBar = False
        MsgBox "ActiveWindow.DisplayVerticalScrollBar = False"
        .DisplayWorkbookTabs = False
        MsgBox "ActiveWindow.DisplayWorkbookTabs = False"
        .WindowState = xlNormal
        MsgBox "ActiveWindow.WindowState = xlNormal"
        .Height = 150
        MsgBox "ActiveWindow.Height = 150"
        .Width = 150
        MsgBox "ActiveWindow.Width = 150"
        .Top = 0
        MsgBox "ActiveWindow.Top = 0"
        .Left = 0
        MsgBox "ActiveWindow.Left = 0"
        .WindowState = xlMaximized
        .DisplayGridlines = True
        .DisplayHeadings = True
        .Caption = oldCaption
        .DisplayHorizontalScrollBar = True
        .DisplayVerticalScrollBar = True
        .DisplayWorkbookTabs = True
    End With
End Sub