Hi all,
I suspect something fairly obvious, but can't see it.
With the following snippet
Dim destrange As Range
dim destsh as worksheet
Set destsh = Workbooks(myfilename).Sheets(1)
..some code
a) Set destrange = destsh.Range("a11:d19")
b) Set destrange = destsh.Range(Cells(11, 1), Cells(19,4))
Why does (a) work, and (b) fail with messages
"Runtime error '1004'
Method 'Range' of object '_Worksheet' failed
Many thanks
I suspect something fairly obvious, but can't see it.
With the following snippet
Dim destrange As Range
dim destsh as worksheet
Set destsh = Workbooks(myfilename).Sheets(1)
..some code
a) Set destrange = destsh.Range("a11:d19")
b) Set destrange = destsh.Range(Cells(11, 1), Cells(19,4))
Why does (a) work, and (b) fail with messages
"Runtime error '1004'
Method 'Range' of object '_Worksheet' failed
Many thanks
Last edited: