View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
PCLIVE PCLIVE is offline
external usenet poster
 
Posts: 1,311
Default Selection.Resize error

I'm not sure exactly what you want to do. What are you trying to do with
'Resize '?

If you just want to expand your selection to two cells after you offset two
columns, which two cells should be the selection.
Assuming adjacent columns:

ActiveCell.Offset(0, 2).Select
Range(ActiveCell, ActiveCell.Offset(0, 1)).Select

If you mean you want the two cells to be merged, then maybe:

ActiveCell.Offset(0, 2).Select
Range(ActiveCell, ActiveCell.Offset(0, 1)).Select
Selection.Merge

Regards,
Paul


wrote in message
ups.com...

wrote:
I want to starting at a single cell selection, offset two columns and
expand the selection two two cells.
So far I am using:

ActiveCell.Offset(0, 2).Select

Selection.Resize(0, 2).Select

However, I get the runtime error: Application-defined or
object-defined error

Probably just another case of me using something in the wrong place but
I cant see what else to do.

Any help will be appreciated.

Robert


I forgot to say that when I start the code, I have a cell selected and
the error occurs on the second line of code

R