none
VBA Syntax error RRS feed

  • Question

  • Hello,

    New to VBA;

    I have following code:

    Public Function runEPMRefreshWorkSheet()

    Dim lsstr As String


        Dim epm As New FPMXLClient.EPMAddInAutomation
        On Error Resume Next
        epm.OpenBookPublicationWizardOnSpecificTemplate("CTL_ISP_DRAFT", "")
        epm.RefreshActiveSheet



    End Function

    I am getting an error on OpenBookPublicationWizardOnSpecificTemplate saying "Expected: ="    

    Can you please guide me on how i can fix this?

    Tuesday, June 12, 2018 4:49 PM

All replies

  • Hi my friend,

    this issue is simple to solve.

    Remove ( and )

    Using VB (or VBA), () indicates that's You have a return value

    Then Your code could be: 

    epm.OpenBookPublicationWizardOnSpecificTemplate "CTL_ISP_DRAFT", ""

    Good luck!

    Anderson


    Tuesday, June 12, 2018 5:17 PM
  • Thanks. It worked
    Tuesday, June 12, 2018 6:58 PM