P
Peter Bernadyne
Hello,
I have a range on a worksheet which at any given time may vary as t
length, etc. As such, I am attempting to use variables in the autofil
function in my macro to achieve a correct autofill. I am using th
following:
Selection.AutoFill Destination:=Range(ActiveCell, Cells(universe, 6))
Where 'universe' is a variable which counts the length of the univers
of data I have for which to perform the autofill (sometimes 20 rows
some times 15,000, etc.) and I am using 6 as the column index becaus
the fill on the worksheet takes place in column 'F' as the extrem
column of my fill range.
Whenever I try this, however, I get the following error:
Run-time error '1004':
Method 'Range' of object '_Worksheet' failed
Any hints would be greatly appreciated.
Thanks in advance.
-Pet
I have a range on a worksheet which at any given time may vary as t
length, etc. As such, I am attempting to use variables in the autofil
function in my macro to achieve a correct autofill. I am using th
following:
Selection.AutoFill Destination:=Range(ActiveCell, Cells(universe, 6))
Where 'universe' is a variable which counts the length of the univers
of data I have for which to perform the autofill (sometimes 20 rows
some times 15,000, etc.) and I am using 6 as the column index becaus
the fill on the worksheet takes place in column 'F' as the extrem
column of my fill range.
Whenever I try this, however, I get the following error:
Run-time error '1004':
Method 'Range' of object '_Worksheet' failed
Any hints would be greatly appreciated.
Thanks in advance.
-Pet