View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
bhofsetz[_22_] bhofsetz[_22_] is offline
external usenet poster
 
Posts: 1
Default Range varying in for loop


You need to separate your variables and text fully with quotes and &


Code:
--------------------
Range("A" & initialrow & ":B" & initialrow).Select

Selection.AutoFill Destination:=Range("A" & initialrow-1 & ":B" & x), Type:=xlFillCopy
--------------------


Make sure you keep the spaces between the " and the & and your
variable. The VBA editor doesn't like it when there are no spaces
surrounding the connecting &

HTH


--
bhofsetz
------------------------------------------------------------------------
bhofsetz's Profile: http://www.excelforum.com/member.php...o&userid=18807
View this thread: http://www.excelforum.com/showthread...hreadid=379708