Error with Name.Comment property in German version of Excel

jackms

New Member
Joined
Dec 28, 2005
Messages
35
Office Version
  1. 2016
Platform
  1. Windows
Setting the Name.Comment property in German version of Excel seems to corrupt the name. Am I doing something wrong? Ideas how to fix?

The following code illustrates the issue
VBA Code:
Sub testNameComment()

ActiveWorkbook.Names("n").RefersTo = Cells(1, 1) 'ref1
ActiveWorkbook.Names("n").Comment = "b"  'ref2
ActiveWorkbook.Names("n").Comment = "c"  'ref3

ActiveWorkbook.Names("n").RefersTo = Cells
ActiveWorkbook.Names("n").Comment = "a" 'ref4

End Sub

In English US version, this runs without any surprises.
But here's what happens when run in German version.
After the first line (I marked it 'ref1'), all looks good (watch window and Name manager screenshots)
ref1.PNG
ref1 name manager.PNG


but after going through the 2nd line, the references get messed up (they all change to German R1C1 format)
ref2.png
ref2 name manager.png


and then in line 3 I get a 1004 error (screenshot via Google translate!)
1004 error.png


In line 4 and 5 it gets worse - I can't set the comment property even once.
In line 4, I set the reference to all cells, and it looks ok at this point:
ref4.PNG
ref4 name manager.PNG


but then in line 5 I get a 1004 error!
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Forum statistics

Threads
1,214,870
Messages
6,122,021
Members
449,060
Latest member
LinusJE

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