View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default VBA Variables....

Where's the activecell when you start this procedure?

Maybe...

Set BottomRow = ActiveCell.entirerow.cells(1) 'column A
Set Beginning = range("a2")

Beginning.autofill _
Destination:=Range(Beginning, BottomRow)), Type:=xlFillDefault

=====
Another option:

Range("a2:a" & activecell.row).formula _
= "=VLOOKUP(B2,'download.csv'!$A$2:$J$5000,10,0) "



MarkHear1 wrote:

I am still having problems with my varaibles. Below is the code i have
written, can anybody offer any help as to why it is not working?

Dim BottomRow As Range
Set BottomRow = ActiveCell

Range("a2").Select
Dim Beginning As Range
Set Beginning = ActiveCell

Selection.AutoFill Destination:=Range(Beginning, BottomRow.Offset(0,
-1)), Type:=xlFillDefault

Many Thanks,
Mark


--

Dave Peterson