-
-
Save hedgejanuary/e252dfdde2148a0ebf8eb864721b5ab9 to your computer and use it in GitHub Desktop.
Set the zoom level 100% & standard view, and select A1 cell.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub FinaliseWorksheetsSetting() | |
'すべてのシートのアクティブセルをA1とし、標準表示・表示倍率を100%に設定する。 | |
'アドインとして登録しているため、ThisWorkbookではなくActiveWorkbookとしている。 | |
Dim i As Long | |
Dim ZoomLevel As Long | |
ZoomLevel = InputBox(Prompt:="シートの表示倍率を" & vbCrLf & "半角数字で指定してください。", Default:=100) | |
If StrPtr(ZoomLevel) = 0 Then Exit Sub | |
For i = 1 To ActiveWorkbook.Worksheets.Count | |
ActiveWorkbook.Worksheets(i).Activate | |
ActiveSheet.Range("A1").Select | |
ActiveWindow.ScrollColumn = 1 | |
ActiveWindow.ScrollRow = 1 | |
ActiveWindow.View = xlNormalView | |
ActiveWindow.Zoom = ZoomLevel | |
Next i | |
ActiveWorkbook.Worksheets(1).Activate | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment