ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Resize query (https://www.excelbanter.com/excel-programming/441511-resize-query.html)

Graham[_2_]

Resize query
 
Very basic but I cannot get this work work and do not understand why.I
would appreciate any help

Graham

Dim myrange As Range

Set myrange = Range("AF1").CurrentRegion


myrange.Resize(7, 0).Select

I keep getting an application defined or object defined error.

Jim Cone[_2_]

Resize query
 
Try...
myrange.Resize(7).Select
--
Jim Cone
Portland, Oregon USA
custom sorting... http://www.contextures.com/excel-sort-addin.html




"Graham"
wrote in message ...
Very basic but I cannot get this work work and do not understand why.I
would appreciate any help
Graham

Dim myrange As Range
Set myrange = Range("AF1").CurrentRegion

myrange.Resize(7, 0).Select

I keep getting an application defined or object defined error.

Graham[_2_]

Resize query
 
Oh dear, a lot of humble pie I think! Many thanks for patience and quick
reponse.

Graham

On 09/04/2010 22:50, Jim Cone wrote:
Try...
myrange.Resize(7).Select



FSt1

Resize query
 
hi
it is not possible to have a range 0 columns wide.
change to.......

myrange.Resize(7, 1).Select

also not possible to have a range 0 rows high.

Regards
FSt1

"Graham" wrote:

Very basic but I cannot get this work work and do not understand why.I
would appreciate any help

Graham

Dim myrange As Range

Set myrange = Range("AF1").CurrentRegion


myrange.Resize(7, 0).Select

I keep getting an application defined or object defined error.
.



All times are GMT +1. The time now is 01:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com