Dave_Holland89
New Member
- Joined
- Jan 18, 2018
- Messages
- 5
Hello All
Just trying to use an integer as my relative column reference in the below. It works fine with a single cell but I get a '400' error when using it against a range of more than one cell.
For example, the below works just fine as it puts a value in cell E5 on the specified sheet
However when I want to put the same value in a range of cells, as below (going in to E5:E10)
I'm sure it must be simple but I can't figure out why it's throwing an error! Is it because I'm assigning a single value to 5 cells rather than 1:1 or 5:5?
Thanks
Dave
Just trying to use an integer as my relative column reference in the below. It works fine with a single cell but I get a '400' error when using it against a range of more than one cell.
For example, the below works just fine as it puts a value in cell E5 on the specified sheet
Code:
ThisWb.Sheets("Tests by Week").Range(Cells(5, i)).Value = 1
However when I want to put the same value in a range of cells, as below (going in to E5:E10)
Code:
ThisWb.Sheets("Tests by Week").Range(Cells(5, i), Cells(10, i)).Value = 1
I'm sure it must be simple but I can't figure out why it's throwing an error! Is it because I'm assigning a single value to 5 cells rather than 1:1 or 5:5?
Thanks
Dave