T
The poster formerly known as Colleyville Alan
I recently posted about an application that I developed in Excel 2000 that
did not work in Excel 2003. For one thing, the checkbox.name property in
Excel 2000 is not available to VBA in 2003. I was able to get the name by
checking the object type and if it was a textbox, getting the object name.
It seems strange that MS would remove the name property from VBA, but here
is something even more strange. I had code that looped through all of the
objects on the screen. It would test the object using the "typeof" command.
If the object was a textbox, it did one action, if not, the action was
skipped. This, too, worked fine in Excel 2000. However, in Excel 2003,
when the code looked at an OptionButton and tested to see if it was a
CheckBox, the result came back True!
If the progam was looking at a CheckBox and I asked if it was an
OptionButton, I would get a value of False. But when it looked at
OptionButtons and asked if they were CheckBoxes, it said true. So I had two
if statements, one that had a goto <label> built-in in case it was an
OptionButton and the second one for the normal processing. I did not have
anything this strange happen in Excel 2000.
Anybody else know about this? Is this a well-known bug that I am just now
encountering?
did not work in Excel 2003. For one thing, the checkbox.name property in
Excel 2000 is not available to VBA in 2003. I was able to get the name by
checking the object type and if it was a textbox, getting the object name.
It seems strange that MS would remove the name property from VBA, but here
is something even more strange. I had code that looped through all of the
objects on the screen. It would test the object using the "typeof" command.
If the object was a textbox, it did one action, if not, the action was
skipped. This, too, worked fine in Excel 2000. However, in Excel 2003,
when the code looked at an OptionButton and tested to see if it was a
CheckBox, the result came back True!
If the progam was looking at a CheckBox and I asked if it was an
OptionButton, I would get a value of False. But when it looked at
OptionButtons and asked if they were CheckBoxes, it said true. So I had two
if statements, one that had a goto <label> built-in in case it was an
OptionButton and the second one for the normal processing. I did not have
anything this strange happen in Excel 2000.
Anybody else know about this? Is this a well-known bug that I am just now
encountering?