Excel 如何创建宏以导航到其他图纸
我试图返回到宏页面;但是,我收到一个运行时错误Excel 如何创建宏以导航到其他图纸,excel,vba,Excel,Vba,我试图返回到宏页面;但是,我收到一个运行时错误 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
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(什么形式:=FRM电子端口,锚点范围:=Range(“B1”),水平方向:=HO,垂直方向:=VO)
错误是什么?错误是什么?