Hello there,
So, I have a main sub where most of my code is called split data:
So, I have LoopSum defined as this:
However, I'm getting the following error
Has anyone got any idea why this is?
Has it something got to do with the way that I am calling the two parameters in LoopSum or should I have the Sub named Private Sub or Public Sub or something like that?
Also, please don't tell me how to do it a different way. This is a snapshot of the code in both SplitData and LoopSum.
Thanks,
E
So, I have a main sub where most of my code is called split data:
Code:
Sub SplitData()
'Code code code code code code
FRD = 1
BTop = 1
FRS = 8
FRO = 11
FRL = 20
LoopSum(FRD, BTop)
LoopSum(FRS, FRD)
LoopSun(FRO, FRS)
'....etc...
End Sub
So, I have LoopSum defined as this:
Code:
Sub LoopSum(LS As String, Tp As String)
Dim Links As Worksheet
Set Links = Sheets("Links")
Links.Cells(LS, 6) = "=SUM(F" & Tp & ":F" & LS - 1 & ")"
Links.Range(Cells(LS + 1, 6), Cells(LS + 1, 16)).ClearContents
End Sub
However, I'm getting the following error
Compile Error: Expected: =
Has anyone got any idea why this is?
Has it something got to do with the way that I am calling the two parameters in LoopSum or should I have the Sub named Private Sub or Public Sub or something like that?
Also, please don't tell me how to do it a different way. This is a snapshot of the code in both SplitData and LoopSum.
Thanks,
E