Sub 群組設定版面()
Dim Wb As Workbook, xActSheet As Worksheet, j As String, xi As String, x As Double, i As Long
Dim k1 As String, k2 As String, k3 As String, k4 As String, k5 As String, k6 As String
Application.ScreenUpdating = False
Application.DisplayAlerts = False '在程序執行過程中使出現的警告框不顯示
Application.Calculation = xlManual '手動計算
Set Wb = Workbooks(Workbooks("Macro_T.xlsm").Worksheets("VBA").Range("P1").Value) '儲存格的值為檔案名稱
.Zoom = x '列印縮放
.Orientation = xlLandscape '橫向列印
End With
Next
' End With
Application.ScreenUpdating = True '打開屏幕更新
Application.Calculation = xlAutomatic '自動計算
For i = 2 To Wb.Sheets.Count '在工作表中循環
Wb.Sheets(i).Activate
With Wb.ActiveSheet.PageSetup
省略....
End With
Next
問題二:這個問題一開始不清楚用途,之後看有先進回覆,就沒在研究了,後續有時間再研究看看作者: PJChen 時間: 2020-2-10 16:24