返回列表 上一主題 發帖

[發問] 開活頁簿,自動開另一個,兩個垂直並排顯示

本帖最後由 singo1232001 於 2023-12-4 01:41 編輯

回復 1# av8d


    Sub 巨集1()

Left1 = 0
Top1 = 0
width1 = 575 ' (請自行調整寬度)
height1 = 617 ' (請自行調整高度)

For Each Z In Windows
If Z.Caption Like "活頁簿1.xlsm" Then
If Z.WindowState <> xlNormal Then Z.WindowState = xlNormal
If Z.WindowState <> xlNormal Then Z.WindowState = xlNormal
    Z.Left = Left1
    Z.Top = Top1
    Z.Width = width1
    Z.Height = height1
ElseIf Z.Caption Like "活頁簿2.xlsm" Then
If Z.WindowState <> xlNormal Then Z.WindowState = xlNormal
If Z.WindowState <> xlNormal Then Z.WindowState = xlNormal
    Z.Left = Left1 + width1
    Z.Top = Top1
    Z.Width = width1
    Z.Height = height1
End If
Next
End Sub

TOP

        靜思自在 : 信心、毅力、勇氣三者具備,則天下沒有做不成的事。
返回列表 上一主題