View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
[email protected] paul.robinson@it-tallaght.ie is offline
external usenet poster
 
Posts: 789
Default Selection.Resize error

Hi
You have siad your new range has 0 rows. Try
ActiveCell.Offset(0, 2).Select
Selection.Resize(, 2).Select

or better still
ActiveCell.Offset(0, 2).Resize(, 2).Select

This uses the same number of rows as ActiveCell. you could also use
Resize(1,2).
regards
Paul

wrote:

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