Shape ControlFormat.LinkedCell returns wrong Address for named
Is it a bug - yes, but not what you think.
The bug is really in your code, not in excel's behavior. The checkbox
remains linked to Sheet2!C1. You could say it is a bug that LinkedCell
returns a string that is exactly what you entered rather than a range
reference, but It don't see it as such. If you coded the rule as an
unqualified cell reference is to the sheet containing the control and a
qualified reference is just that, then you will get the correct
interpretation.
You haven't done that in your code. You just use the cell address C1 and
pass it to an unqualified range argument
Range("C1") will always refer to the activesheet, but that isn't the cell
linked to by the control
to test, make sheet1 active. Your code would report it is linked to
sheet1!C1, but if you do
worksheets("sheet2").Checkboxes(2).Value = True
then it is Sheet2!C1 that gets changed even with sheet1 or sheet3 active.
So your code isn't reporting properly.
So yes, I will agree your code definitely has a bug. <g
--
Regards,
Tom Ogilvy
" wrote:
Ok, that's fair, but this is definitely a bug, right?
|