Cell "AP65536" ?

Randal

Board Regular
Joined
Mar 30, 2009
Messages
142
I am using the following code to name a range that has data in every cell from column B to column AP.

Set rRange = Range("B2", Range("AP65536").End(xlUp))
ThisWorkbook.Names.Add "TheName", rRange


Problem is that it only define through column "Z" and does not see into column AA. AB etc.

Why does this only work up to column Z? -R-
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
That's working for me. I would try setting a watch on rRange.Address and stepping through the code.
 
Upvote 0
Thanks and sorry, my bad. It was the ColumnCount setting in the Properties of the listbox that was limiting the number of columns. After I increased the value the columns came into the listbox. -R-
 
Upvote 0

Forum statistics

Threads
1,214,849
Messages
6,121,925
Members
449,056
Latest member
denissimo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top