Book Home Page Bloglines 1906 CelebrateStadium 2006 OfficeZealot Scobleizer TechRepublic AskWoody SpyJournal Computers Software Microsoft Windows Excel FrontPage PowerPoint Outlook Word Host your Web site with PureHost! |
Thursday, December 17, 2015 – Permalink – Animate Window SizeSo cool!The following macro has little or no practical computing value, but it can add a "way cool" element when a worksheet is unhidden. There are three states that a worksheet can be in; Minimized, Maximized, and Normal. From AutomateExcel.com: ActiveWindow.WindowState (By Mark William Wielgus) Also fun: Sub SheetGrow() Dim x As Integer, xmax As Integer With ActiveWindow .WindowState = xlNormal .Top = 1 .Left = 1 .Height = 50 .Width = 50 If Application.UsableHeight > Application.UsableWidth Then xmax = Application.UsableHeight Else xmax = Application.UsableWidth End If For x = 50 To xmax If x <= Application.UsableHeight Then .Height = x If x <= Application.UsableWidth Then .Width = x Next x .WindowState = xlMaximized End With End Sub # posted by Joerd See all Topics excel Labels: Customize, General, Macros, Reference, Tips, Tutorials, VBA <Doug Klippert@ 3:45 AM
Comments:
Post a Comment
|