Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / April 2004

Tip: Looking for answers? Try searching our database.

Detecting Screen res

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Fraggs - 27 Apr 2004 13:29 GMT
Is there a way Excel can auto detect the screen res of a VDU an
automatically resize thing like msg boxes so that text is centred o
both big and small screen  resolutions rather than ending with the tex
all over the place ?

Cheeeeeeeeeeers

--
Message posted from http://www.ExcelForum.com
Don Guillett - 27 Apr 2004 14:03 GMT
Here is an open macro that automatically re-sizes the zoom based on users
resolution. It is set to do each sheet based on the defined range to be
used. So, in THIS case, each sheet must have the defined name sheet1!myzoom
, etc.

Private Sub Workbook_Open()
Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False

   Dim tstRange As Range
   Dim curWks As Worksheet
   Dim wks As Worksheet

   For Each wks In ActiveWorkbook.Worksheets
           With wks
           If wks.Name <> "Parts" Then
           Set tstRange = Nothing
           On Error Resume Next
           Set tstRange = .Range("myzoom")
           On Error GoTo 0
           If tstRange Is Nothing Then
           'do nothing
           Else
               .Select
               tstRange.Select
               ActiveWindow.Zoom = True
               .Range("a1").Select
           End If
       End If
       End With

    Next wks
    Sheets("cover").Select
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub

Signature

Don Guillett
SalesAid Software
donaldb@281.com

> Is there a way Excel can auto detect the screen res of a VDU and
> automatically resize thing like msg boxes so that text is centred on
[quoted text clipped - 5 lines]
> ---
> Message posted from http://www.ExcelForum.com/
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.