Fernando14
New Member
- Joined
- Jun 29, 2021
- Messages
- 12
- Office Version
- 2019
- Platform
- Windows
I keep getting an application/object defined error for a line of code. I have a loop similar to this one that works fine with the same varaibles. I also reference cells in the same way in other parts of the code without error. Here is the code :
The error is in Worksheets.... line. I think the issue lies within the cell reference, but I don't understand why I am getting this error. Any help is appreciated.
Excel Formula:
For i = 1 To FLAGNUM
If FLAGSNORP(i) = "N" Then NORP = "Nylon" Else NORP = "Poly"
Worksheets("OUTPUTS").Cells(11, cellnum) = NORP & " flag " & i & " area= " & (FLAGSW(i) * FLAGSL(i)) & " sq.ft. "
cellnum = cellnum + 2
Next i