View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
lwm lwm is offline
external usenet poster
 
Posts: 38
Default capturing current range of cells


I am developing several utilities that I can give to my customers. I am a
financial and accounting consultant to businesses specializing in Excel.

The user selects a cell.

I want to place that cell in a variable so I can use it in the future.

i.e. x= cell selected.

Location of new stuff cells(1,x+6)

Or
range = range(x, x=6)
range(x).select
Or

The user selects a range a12.r12

I want to save that range in a variable so I can use it in a future function.

X= A12.R12 wont work because it is absolute. I need a relative address..

I am looking for something like

X= range.select

Selection.AutoFill Destination:=ActiveCell.Range(x), Type:=xlFillDefault

This selects the appropriate range and then copies the appropriate data.