Loading one workbooks Names(i) into another

paipimenta

Board Regular
Joined
Apr 7, 2010
Messages
103
Hey Excel people,

I've got a worksheet that end users fill out. Several of these files will be in one folder. I've got a separate report workbook that will select the folder with a dialog and load every file's data (marked with Named cells) into rows on my DataFarm sheet in the report workbook.

I notice a few names that I did not put into the names list that are not visible when I press Ctrl+F3, but are when I MsgBox out the thisName.Name of Names(i)... 'Master-System'!Print_Area and Hawaii!_FilterDatabase. I want to delete these names, but I'm getting a Run Time Error '424': Object required pointing to this code...

Code:
            If thisName.Name = "'HI'!_FilterDatabase" Then
                thisName.Delete
            End If

This is preceded by this... and seems to be working fine with the others:

Code:
             For Each thisName In Workbooks(Workbooks.Count).Names
                    If thisName.Name = "Extract" Then
                        thisName.Delete
                    End If
 
                    If thisName.Name = "'Master-System'!Print_Area" Then
                        thisName.Delete
                    End If

I viewed this name fine when I did this...
Code:
                    'MsgBox ("Names(" & thisName.Index & ") = " & thisName.Name)

so what's up???
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

Forum statistics

Threads
1,214,835
Messages
6,121,880
Members
449,057
Latest member
Moo4247

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