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?
 

Some videos you may like

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

drsarao

Well-known Member
Joined
Sep 9, 2009
Messages
1,143
Office Version
  1. 2007
Platform
  1. Windows
Verlinden,
Welcome to Board.
Posting the problem code snippet here would help.
 

VerlindenG

New Member
Joined
Jul 1, 2012
Messages
13
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.
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
36,066
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
Are your names or the formulas using them using any add-ins or code?
 

VerlindenG

New Member
Joined
Jul 1, 2012
Messages
13

ADVERTISEMENT

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)
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
36,066
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
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.
 

VerlindenG

New Member
Joined
Jul 1, 2012
Messages
13

ADVERTISEMENT

No, absolutely not. The names refer to a page with rather "constant" values.
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
36,066
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
And this affects every single formula that uses a name? Do other formulas work properly?
 

VerlindenG

New Member
Joined
Jul 1, 2012
Messages
13
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. )
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
36,066
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
Very strange. You aren't using any auto_open macros?
 

Watch MrExcel Video

Forum statistics

Threads
1,122,421
Messages
5,596,033
Members
414,039
Latest member
southike

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
Top