epactheactor
New Member
- Joined
- Sep 9, 2015
- Messages
- 38
Hello everyone.
I'm trying to finish the most complex macro I've ever done and have run into an error that is blowing my mind. I'm learning VBA so I would like to understand the error and not just get a fix, if that makes sense, so I don't make it again.
I get an the '1004' error on my Boo variable and I don't know why.
Previously I wasn't using a loop and was renaming the Boo variable manually as well as well as repeating the code and it ran fine. But for what i am using it for, there could be 2 subsegments, or 100 so I really need to use a loop.
Thank you for any help.
I'm trying to finish the most complex macro I've ever done and have run into an error that is blowing my mind. I'm learning VBA so I would like to understand the error and not just get a fix, if that makes sense, so I don't make it again.
I get an the '1004' error on my Boo variable and I don't know why.
Code:
Sub RunScores
Dim Boo As String
Set XYZWorkbook = ActiveWorkbook
Boo = "A8"
'Goes through each subsegment
'If it is blank, it stops
Do While IsEmpty(Range(Boo).Value) = False
Range(Boo).UnMerge
Call FillInScores
Range(Boo).Select
Boo = Range(Boo).Offset(3, 0)
Loop
End Sub
Previously I wasn't using a loop and was renaming the Boo variable manually as well as well as repeating the code and it ran fine. But for what i am using it for, there could be 2 subsegments, or 100 so I really need to use a loop.
Thank you for any help.
Last edited by a moderator: