Я пытаюсь вернуться на страницу макроса; однако я получаю ошибку во время выполнения.
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)