Range resize

  • Thread starter Thread starter Ray Batig
  • Start date Start date
R

Ray Batig

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
 
Ray,

This ought to work...

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

Regards,
Jim Cone
San Francisco, CA
 
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).Name = "Mytable"
 
Ray said:
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top