I would like to use a single line of code to refer to the same cell but in different worksheets (within the same workbook). For example:
Dim SheetRef as Worksheet
SheetRef = Sheet6
SheetRef.Range("E5").Value = "Please work!"
where SheetRef can be changed within VB to represent different worksheet index numbers (rather than sheet name).
I have tried many combinations, dim'd the variable as many different things, googled high and low and made no progress, any assistance very much appreciated!
Many thanks,
Martin.