Detecting Screen res

  • Thread starter Thread starter Fraggs
  • Start date Start date
F

Fraggs

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
 
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
 
Back
Top