getting and error with autofill ":=" ?

K

Kenny

I allow the user to select the begining 2 cells, the over all range,
starting date, and pattern date. however when I try to apply the
autofill statement I'm getting an error... ":="

code...

Sub CashFlows()

Dim rRange1 As Range
Dim rRange2 As Range
Dim dDueDate As String
Dim dPatternDate As String

Set rRange1 = Application.InputBox("Enter Begining 2 Cell Range: ", , ,
, , , , 8)
Set rRange2 = Application.InputBox("Enter Destination Cell: ",
Type:=8)
dDueDate = Application.InputBox("Enter due date... mm/dd/yyyy", , , , ,
, , 2)
dPatternDate = Application.InputBox("Enter pattern date... mm/dd/yyyy",
, , , , , , 2)

[rRange1] = Array(dDueDate, dPatternDate)

RRANGE1.AUTOFILL(RRANGE2,XLFILLFORMATS AND XLFILLSERIES)

End Sub
.........

I know this is trival....but thank you to anyone who has time. The
book I have is not as descriptive as I would like.
 
R

RADO

I think you have 2 mistakes here:
1) don't use ()
2) don't use AND

It should be something like this (2 lines instead of one)::

RRANGE1.AUTOFILL RRANGE2, XLFILLFORMATS
RRANGE1.AUTOFILL RRANGE2, XLFILLSERIES

Best,
RADO

Kenny said:
I allow the user to select the begining 2 cells, the over all range,
starting date, and pattern date. however when I try to apply the
autofill statement I'm getting an error... ":="

code...

Sub CashFlows()

Dim rRange1 As Range
Dim rRange2 As Range
Dim dDueDate As String
Dim dPatternDate As String

Set rRange1 = Application.InputBox("Enter Begining 2 Cell Range: ", , ,
, , , , 8)
Set rRange2 = Application.InputBox("Enter Destination Cell: ",
Type:=8)
dDueDate = Application.InputBox("Enter due date... mm/dd/yyyy", , , , ,
, , 2)
dPatternDate = Application.InputBox("Enter pattern date... mm/dd/yyyy",
, , , , , , 2)

[rRange1] = Array(dDueDate, dPatternDate)

RRANGE1.AUTOFILL(RRANGE2,XLFILLFORMATS AND XLFILLSERIES)

End Sub
........

I know this is trival....but thank you to anyone who has time. The
book I have is not as descriptive as I would like.


------------------------------------------------



~~Now Available: Financial Statements.xls, a step by step guide to
creating financial statements
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top