Visual Basics in Excel Program Compile Error RRS feed

  • Question

  • TLDR: calling a sub within another sub throws a compile error "expected ="

    So, in the below sub I am getting a compile error ("expected =") when I call the tenMinImport line. I am kind of new to VB but after going through the online trouble shooting/ other posts I did not see why it would throw this error. any thoughts?

    Sub januaryProcess()

        Dim Day As Integer
        Dim StartRow As Integer
        Dim fileName As String
        Day = 1
        StartRow = 1
        fileName = "01 2015.xslx"
        'ten min import, first of jan-special for first data
        tenMinImport(fileName,StartRow, Day)

    End Sub

    tenMinImport has declaration below....

    Sub tenMinImport(fileName As String, StartRow As Integer, Day As Integer)

    Friday, June 3, 2016 2:39 PM

All replies

  • Hi,

    This is the forum to discuss questions and feedback for Microsoft Excel, I'll move your question to the MSDN forum for VBA:

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.


    Emi Zhang
    TechNet Community Support

    Please mark the reply as an answer if you find it is helpful.

    If you have feedback for TechNet Support, contact

    Tuesday, June 7, 2016 1:57 AM
  • tenMinImport fileName, StartRow, Day
    Try that. -

    Tuesday, June 7, 2016 2:32 PM