Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Range().resize giving errors

Harry, You are an idiot. You didn't understand how Range.resize
resizes your range. You thougt that the arguements were relative
arguments to resize the range, whereas they are absoute arguments, so
where you were saying
rng2 = rng1.resize(0,1); you were getting your 'application defined
error'

What you really meant to say was
set rng2 = rng1.resize( 0 + rng1.rows.count, 1 + rng1.columns.count)


Harry Tuttle wrote:

Hello

Could someone please tell me why when I code somthing like:

rng2 = rng1.resize(4,4)



^^^^^^^^^^^^^^^^^
If you woudl have actually coded that you wouldn't have gotten an error,
but instead you codded
rng2 = rng1.resize(0,1), you dumbass

gives me an 'application defined object error', while

rng1.resize(4,4).select works fine?

Thanks!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Range().resize giving errors

What you really meant to say was

set rng2 = rng1.resize(, 1 + rng1.columns.count)

--
Regards,
Tom Ogilvy


"Harry Tuttle" wrote in message
...
Harry, You are an idiot. You didn't understand how Range.resize
resizes your range. You thougt that the arguements were relative
arguments to resize the range, whereas they are absoute arguments, so
where you were saying
rng2 = rng1.resize(0,1); you were getting your 'application defined
error'

What you really meant to say was
set rng2 = rng1.resize( 0 + rng1.rows.count, 1 + rng1.columns.count)


Harry Tuttle wrote:

Hello

Could someone please tell me why when I code somthing like:

rng2 = rng1.resize(4,4)



^^^^^^^^^^^^^^^^^
If you woudl have actually coded that you wouldn't have gotten an error,
but instead you codded
rng2 = rng1.resize(0,1), you dumbass

gives me an 'application defined object error', while

rng1.resize(4,4).select works fine?

Thanks!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Range().resize giving errors

Tom Ogilvy wrote:
What you really meant to say was

set rng2 = rng1.resize(, 1 + rng1.columns.count)


Thank!
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Function giving a result for number within a range [email protected] Excel Worksheet Functions 3 February 28th 06 10:57 AM
Range().resize giving errors Harry Tuttle Excel Programming 0 December 27th 05 07:04 PM
Macro giving errors at workbook open kcdonaldson Excel Discussion (Misc queries) 1 December 6th 05 04:15 PM
How do I add up a range of times giving answer in hrs & mins >24h. Richard T Excel Worksheet Functions 2 April 13th 05 04:10 PM
Range.Delete and Range.Resize.Name performance issues Test.File Excel Programming 0 February 15th 05 03:33 PM


All times are GMT +1. The time now is 12:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"