Hey Mr Excel Members
I keep getting an error ("wrong number of arguments" or "method range failed for object _worksheet") on trying to add multiple different cells from different rows (row as long that can change) to a range.
Im just trying to make the LabelRange different values, depending on different rownumbers. I used to go with
but that throws errors occasionally too..
Im not sure what Im doing wrong, any help would be greatly appreciated...
Already read through this: Worksheet().Range(Cell(), Cell()) syntax?
and it didnt work
I keep getting an error ("wrong number of arguments" or "method range failed for object _worksheet") on trying to add multiple different cells from different rows (row as long that can change) to a range.
VBA Code:
Dim TPsheet As Worksheet
Set TPsheet = ThisWorkbook.Worksheets("TP")
Dim rownumber as Long
I = 5
Dim LabelRange as Range
Set LabelRange = TPsheet.Range(TPsheet.Cells(rownumber, "C"), TPsheet.Cells(rownumber, "E"), TPsheet.Cells(rownumber, "G"), TPsheet.Cells(rownumber, "I"))
Im just trying to make the LabelRange different values, depending on different rownumbers. I used to go with
VBA Code:
Set LabelRange = TPsheet.Range("C" & CStr(rownumber) & "," & "E" & CStr(rownumber) & "," & "G" & CStr(rownumber) & "," & "I" & CStr(rownumber))
Im not sure what Im doing wrong, any help would be greatly appreciated...
Already read through this: Worksheet().Range(Cell(), Cell()) syntax?
and it didnt work