Created
March 16, 2012 05:26
-
-
Save nobrinskii/2048637 to your computer and use it in GitHub Desktop.
[vba/excel] エクセルの動作一括制御
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
'############################################################################## | |
'エクセルの動作一括制御 | |
'############################################################################## | |
'------------------------------------------------------------------------------ | |
'エクセルの自動機能停止 | |
'------------------------------------------------------------------------------ | |
'【引数】 | |
'【戻り値】 | |
'【備考】 | |
Private Sub FreezeExcel() | |
With Application | |
.Visible = False '全体の表示を停止 | |
.DisplayAlerts = False 'アラートの表示を停止 | |
.StatusBar = False 'ステータスバーの表示更新を停止 | |
.ScreenUpdating = False 'スクリーンの描画を停止 | |
.EnableEvents = False 'イベントを一時停止 | |
.Calculation = xlManual '計算を手動モードにする | |
End With | |
End Sub | |
'------------------------------------------------------------------------------ | |
'エクセルの自動機能再開 | |
'------------------------------------------------------------------------------ | |
'【引数】 | |
'【戻り値】 | |
'【備考】 | |
Private Sub MeltExcel() | |
With Application | |
.Calculation = xlAutomatic '計算を自動モードに戻す | |
.EnableEvents = True 'イベントを再開 | |
.ScreenUpdating = True 'スクリーンの描画を再開 | |
.StatusBar = True 'ステータスバーの表示を再開 | |
.DisplayAlerts = True 'アラートの表示を再開 | |
.Visible = True '全体の表示を回復 | |
End With | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment