VBA Compile Error Expected Sub, Function Or Property

Viewed 39

I keep getting the compile error resposne Expected Sub, Function or Property, when trying to run below VBA code. The problem is with the called sub procedure. Any insight as to why will be appreciated.

        Result5iii = Result6i - Result4
        ResultGi = Result5iii - Range("G2").Value
                        Range("W3").Value = ("ResultGi")
                        Range("X3").Value = (" Can Use: [ " & ResultGi & " ]")
                        Range("Y3").Value = ("2 Nxt will not be " & ResultGi)
                        Range("Z3").Value = (" 19|15|5ii ")
                        
                        'Minus1Rule_OriginalsG'
                            If Result5iii = 5 And Range("G2").Value = 1 And ResultGi = 4. Then
                                Call Minus1Rule_5OriginalsG

The called Procedure is;

Public Sub Minus1Rule_5OriginalsG()
Dim ResultG As Double, Result5i As Double, Result1 As Double, Result1a As Double

'1. -1 Rule'

'For Originals'
        Range("W2").Value = (" 0, 5 [ " & ResultG & " ]")
        Range("X2").Value = (" Can Use:  0, 5 [ " & ResultG & " ]")
        Range("Y2").Value = ("2 Nxt will not be " & "0, 5" & "Reason: -1 Rule For Originals")
        Range("Z2").Value = (Result1 & "|" & Result1a & " 5 - 1" & "|" & "5i ")

End Sub
0 Answers
Related