Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/vba/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/amazon-web-services/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Excel 如何创建宏以导航到其他图纸_Excel_Vba - Fatal编程技术网

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)

错误是什么?错误是什么?