用宏打开VBAwindow
Open VBA window with macro
我目前正在 excel 开发一个 vba 工具,它有自己的 UI。通常我在使用它时不需要 VBA window 。
但有时我想在不关闭 UI 的情况下打开 VBA window 进行一些更改(此时 Alt + F11 不起作用)。所以我正在考虑一个打开 VBA window 的按钮。有什么命令可以打开吗?
提前致谢!
这是我一直用的东西。
此代码已 "tuned" 适用于我笔记本电脑屏幕的尺寸。 运行 它 VBE window 和应用程序 window 并排打开:
Sub dual()
Dim h As Long
With Application
.WindowState = xlMaximized
x = Application.ActiveWindow.Width \ 2
h = Application.ActiveWindow.Height
.WindowState = xlNormal
.Left = 545
.Height = 550
.Width = x * 0.9
.Top = 0
With .VBE.MainWindow
.Width = 1.4 * x
.Left = 0
.Top = 0
.Height = 740
.WindowState = vbext_ws_Normal
End With
End With
End Sub
我目前正在 excel 开发一个 vba 工具,它有自己的 UI。通常我在使用它时不需要 VBA window 。
但有时我想在不关闭 UI 的情况下打开 VBA window 进行一些更改(此时 Alt + F11 不起作用)。所以我正在考虑一个打开 VBA window 的按钮。有什么命令可以打开吗?
提前致谢!
这是我一直用的东西。
此代码已 "tuned" 适用于我笔记本电脑屏幕的尺寸。 运行 它 VBE window 和应用程序 window 并排打开:
Sub dual()
Dim h As Long
With Application
.WindowState = xlMaximized
x = Application.ActiveWindow.Width \ 2
h = Application.ActiveWindow.Height
.WindowState = xlNormal
.Left = 545
.Height = 550
.Width = x * 0.9
.Top = 0
With .VBE.MainWindow
.Width = 1.4 * x
.Left = 0
.Top = 0
.Height = 740
.WindowState = vbext_ws_Normal
End With
End With
End Sub