Re: [Excel VBA] Error 1004
Put some code in to stop when it encounters that error, then see what the value of L+current row and A+current row+1 are.
Re: [Excel VBA] Error 1004
Thanks, actually I already have used the Immediate window to see the values. They both are long strings. I even tried:
Code:
print .Range("L" & CurrentRow).Value & .Range("A" & CurrentRow + 1).Value
and it works fine and does what I would expect it to do.
Re: [Excel VBA] Error 1004
Any way you can "dummy up" a small part of the data and then show us the workbook? Not sure what to suggest without seeing it behave. Does it always fail at the same place?
Re: [Excel VBA] Error 1004
Yes, it is stopping at the same place every time.
First part of the string which is in cell L CurrentRow is:
=T("<<PER PH* OTHER>>
Second part which is in Column A of next row is just a long string, no special characters of any sort (has , and .)
The error is happening when trying to set the value of L CurrentRow to the concatenation of these two values. The part that is weird is that this works fine for many other similar such concatenations that occur before it. All contain weird things like ">>". The first string always starts with =T("
Re: [Excel VBA] Error 1004
Well, I still don't understand why an error was caused but I believe I have fixed it. I created a string variable TempString to store the value in and concatenated with that... TempString = TempString & ... and then finally put that back in L CurrentRow. Now, it works.