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

Greetings,

Mine is a range in a column. I would like to build Mytable having the same
number of rows as Mine, but, 30 columns wide.

I tried

Range("Mine").Resize( ,30).Name = "Mytable

but it gives me the error Method "Range" of object'_Global' failed.

How do I fix this? Are there some references that explain this approach?

Thanks in advance for your help!

ray


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Range resize

Ray,

This ought to work...

Dim MyTable as Range
Set MyTable = Range("Mine").Resize( ,30)

Regards,
Jim Cone
San Francisco, CA

"Ray Batig" wrote in message ink.net...
Greetings,
Mine is a range in a column. I would like to build Mytable having the same
number of rows as Mine, but, 30 columns wide.
I tried
Range("Mine").Resize( ,30).Name = "Mytable
but it gives me the error Method "Range" of object'_Global' failed.
How do I fix this? Are there some references that explain this approach?
Thanks in advance for your help!
ray


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Range resize

Range("Mine").Resize( ,30).Name = "Mytable"

put a quote on the right

If you are doing this in a sheet module and "MINE" is on another sheet, then
qualify it with the worksheet. Assume MINE is on Sheet3

Worksheets("Sheet3").Range("Mine").Resize(,30).Nam e = "Mytable"

--
Regards,
Tom Ogilvy

"Ray Batig" wrote in message
ink.net...
Greetings,

Mine is a range in a column. I would like to build Mytable having the same
number of rows as Mine, but, 30 columns wide.

I tried

Range("Mine").Resize( ,30).Name = "Mytable

but it gives me the error Method "Range" of object'_Global' failed.

How do I fix this? Are there some references that explain this approach?

Thanks in advance for your help!

ray




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 783
Default Range resize

Ray Batig wrote:

Greetings,

Mine is a range in a column. I would like to build Mytable having the same
number of rows as Mine, but, 30 columns wide.

I tried

Range("Mine").Resize( ,30).Name = "Mytable

but it gives me the error Method "Range" of object'_Global' failed.

How do I fix this? Are there some references that explain this approach?

Thanks in advance for your help!

ray


You just need to close the parenthesis for "Mytable

Alan Beban
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default <Jim, Tom, Alan Range resize

Thanks guys,

I had the " in the code but missed it retyping. The problem was that Mytable
was misspelled in the named range. I still would be interested in a
reference.

Ray

Alan Beban wrote in message
...
Ray Batig wrote:

Greetings,

Mine is a range in a column. I would like to build Mytable having the

same
number of rows as Mine, but, 30 columns wide.

I tried

Range("Mine").Resize( ,30).Name = "Mytable

but it gives me the error Method "Range" of object'_Global' failed.

How do I fix this? Are there some references that explain this

approach?

Thanks in advance for your help!

ray


You just need to close the parenthesis for "Mytable

Alan Beban



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
Resize Range - Macro Danny Excel Worksheet Functions 11 October 22nd 05 12:37 AM
Resize Range Question Ray Batig Excel Programming 3 August 31st 04 02:26 AM
Range Resize jacqui Excel Programming 2 April 6th 04 06:22 PM
Range Resize property jacqui[_2_] Excel Programming 7 February 24th 04 06:11 PM
Resize Range Problem ExcelMonkey[_16_] Excel Programming 3 January 23rd 04 11:15 PM


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

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

About Us

"It's about Microsoft Excel"