Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I got the script below from a magazine but the second to
the last line is giving me an error. How can I fix it? Thanks. Dim fillRange As Range Dim numRows As Integer, numCols As Integer numRows = InputBox("How many rows to fill?", "Do an extended fill") numCols = InputBox("How many columns to fill?", "Do an estended fill") Set fillRange = ActiveCell.Range(Cells(1, 1), Cells (numRows, numCols)) Selection.AutoFill Destination:=fillRange, Type:=xlFillDefault fillRange.Select |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
The macro works fine. The Autofill method requires more than one cell to be selected to determine the fill values for the target cells, so make sure you select more than one row as the source for filling down and more than one column for filling across. The fill range starts from the top left source cell. Cheers "M Rodas" wrote in message ... I got the script below from a magazine but the second to the last line is giving me an error. How can I fix it? Thanks. Dim fillRange As Range Dim numRows As Integer, numCols As Integer numRows = InputBox("How many rows to fill?", "Do an extended fill") numCols = InputBox("How many columns to fill?", "Do an estended fill") Set fillRange = ActiveCell.Range(Cells(1, 1), Cells (numRows, numCols)) Selection.AutoFill Destination:=fillRange, Type:=xlFillDefault fillRange.Select --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 5/03/2004 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
"Cross"-Auto filling: consecutive columns into rows | Excel Worksheet Functions | |||
Auto Filling | Excel Worksheet Functions | |||
Auto filling a row | Excel Discussion (Misc queries) | |||
Auto Protecting cells & auto filling date | Excel Discussion (Misc queries) | |||
auto filling columns from rows | Excel Discussion (Misc queries) |