names not working after opening programmatically

VerlindenG

New Member
Joined
Jul 1, 2012
Messages
13
Excel2010 - OfficeXP and Office2010
I have a pretty big workbook with much names defined and used in it.
When I do open this workbook manually, no problem.
But when I open the workbook in VBA (Workbooks.Open (Filename) not one of the names seems to be recognised: every formala referencing a name gives the "#NAME?" error.

- Recalculating doesn't help.
- When I trie creating a new workbook with names, I do not have the same problem, but this is not really an option for the moment being because my actual workbook with the problem is huge.

Has anyone an idea how to get rid of this problem?
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Verlinden,
Welcome to Board.
Posting the problem code snippet here would help.
 
Upvote 0
Thank you, sir.
This is (only) the problem code snippet:
Workbooks.Open Filename:=tempbronbest
The file opens normally, but with name-errors.
Opening same file in the menus: no problem.






Verlinden,
Welcome to Board.
Posting the problem code snippet here would help.
 
Upvote 0
Are your names or the formulas using them using any add-ins or code?
 
Upvote 0
Well, some of them do, yes.
But, lots of them don't, and I do have the problem even with simple references (most of them to another page of the workbook)
 
Upvote 0
I do have the problem even with simple references (most of them to another page of the workbook)
Do the cells referred to contain #NAME error values? If so, they would propagate to the linked cells as #NAME errors too, even though the name in use was actually OK.
 
Upvote 0
And this affects every single formula that uses a name? Do other formulas work properly?
 
Upvote 0
as far as I saw, yes for your fist question, and yes for sure for your second.
When I remove a name out of a formula, the formula works again (but of course not as I wanted, because there's something missing now). When I put the name back in the formula, formula fails again.
(Only when I close and open the file again but manually, everything's fine. But I would like to open it in VBA. )
 
Upvote 0
Very strange. You aren't using any auto_open macros?
 
Upvote 0

Forum statistics

Threads
1,214,812
Messages
6,121,704
Members
449,048
Latest member
81jamesacct

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