我正在尝试返回到宏页面;但是,我收到运行时错误。
Sub OpenMenu()
Sheets("Macros").Select
Dim PS As Positions
#If VBA6 Then
Dim HO As cstFormHorizontalPosition
Dim VO As cstFormVerticalPosition
#Else
Dim HO As Long
Dim VO As Long
#End If
HO = cstFhpFormLeftCellLeft ' set these to how you want the form positioned relative to AnchorCell
VO = cstFvpFormBottomCellCenter ' set these to how you want the form positioned relative to AnchorCell
'
' Call PositionForm to determine the correct positions
'
PS = PositionForm(WhatForm:=frmSelectReport, AnchorRange:=Range("B1"), HorizOrientation:=HO, VertOrientation:=VO)
frmSelectReport.Top = PS.FrmTop ' set the Top position of the form
frmSelectReport.Left = PS.FrmLeft ' set the Left position of the form
frmSelectReport.Show
End Sub
错误出现在PS = PositionForm(WhatForm:=frmSelectReport, AnchorRange:=Range("B1"), HorizOrientation:=HO, VertOrientation:=VO)