Named Range failure

G

glen.e.mettler

using 2003. I have 6 tabs each with various inventory data values.
The 1st 3 are MON, QTR, YTD each containing quanties of parts by
Month, Quarter, and cost Year To Date. I have written a macro to
create named ranges for these. When I run the macro, it creates the
name and the names show up in the name box next to the formula bar.

So far, so good. Problem. When I run the macro for the other 6 tabs
- Actuals, Forecast, Budget, it creates the names but does not put the
names in the name box.

I have also written a series of macros that create a menu specific to
the tab. The MON, QTY, YTD menu is by month - Jan, Feb...Dec. When I
select Feb, for example, the macro will hide all of the other ranges
and show me only Feb. That works great for those tasks.

When I select Actuals, Forecast, Budget, the menu changes to
selections form MON, QTY, YTD. When I any of these the macro is
suppose to hide all ranges and show only the one I select as above.
But it does not. I suspect that it can't find the range because it is
not in the name box - although I can find it when I go to Insert,
Name, Define etc.

In each sub I build a range name based on menu pik, and tab - example

MyRange = MyRange & MyPik & "_" & MyTab
Range(MyRange).Columns.Hidden = False

This works fine for the first 3 tabs - MON, QTY, YTD but it fails on
the other 3. I get
"method 'Range' of object'_Global' failed and the help but gives me
nothing.

I am at a loss. I have checked, double checked, tripple checked...
the range settings and the concatination values etc and I can't find
what is wrong.


Anybody have a clue?

meg99
 

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

Top