I'm trying to set a cell value to an address but I get a "Run-time error '1004': Application-defined or object-defined error".
Here is the line that is causing the error
now if I take out the first parenthesis and it looks like
it just returns the value of the cell and not the address of the cell, which is what I am looking for.
I tried doing Range("L5").Formula instead of Range("L5").Value but it does the same thing. Any ideas?
Here is the line that is causing the error
Code:
Range("L5").Value = "=('Work Hours Data'!" & Sheet7.Range("A1").Offset(2, x + 6).Address
Code:
Range("L5").Value = "='Work Hours Data'!" & Sheet7.Range("A1").Offset(2, x + 6).Address
I tried doing Range("L5").Formula instead of Range("L5").Value but it does the same thing. Any ideas?