![]() |
command button
Hi,
Can anyone tell me why there's no friggin' tag property with the command button in Excel even though it's listed in help?! Is there any way to store extra info with a command button in Excel?? George R. |
command button
Both the forms controls and the ActiveX controls you use on the worksheet do
not have the tag property. It is only present when used on a user form. Not sure of the reason why as my thought would also be that an ActiveX control would expose all of it's properties, the tag being one of them. Unless of course the ActiveX buttons used on the Worksheet are somehow different from the ones used on the forms. Never thought about this till this post. Anyway bottom line is tag is out for storage when used on a form. I would put data in a named cell underneath the commandbutton on the worksheet. -- Regards, Bill Lunney www.billlunney.com "George" wrote in message ... Hi, Can anyone tell me why there's no friggin' tag property with the command button in Excel even though it's listed in help?! Is there any way to store extra info with a command button in Excel?? George R. |
command button
Bob,
It's a little complex... I'm dynamically placing buttons on sheets and coding their click events as they're created. I just use the button name (without the leading cmd) to refer to what procedure the button will call when clicked, however some procedures take parameters and others don't. That's where I was going to use the Tag property - if it's "" then no param, otherwise some code indicating what I need... If there's no way to store additional info I guess I'll just make all the procedures with parameters and just not use them for some. I could also hardcode the name of the procedures and their characteristics but I wanted to make it more flexible (for possible future use). Thanks for the reply. George -----Original Message----- George, The help refers to userform commandbuttons. What extra info do you need to store, as it is event driven you know when it is clicked. -- HTH Bob Phillips "George" wrote in message ... Hi, Can anyone tell me why there's no friggin' tag property with the command button in Excel even though it's listed in help?! Is there any way to store extra info with a command button in Excel?? George R. . |
command button
George,
I see the problem, the event code doesn't give that room does it? The only thing I can think of is to create named range cells and store the data in those cells. You can be smart and name them logically to the button, and then read their values in the button event code. Anyway, good luck with it. -- HTH Bob Phillips "George" wrote in message ... Bob, It's a little complex... I'm dynamically placing buttons on sheets and coding their click events as they're created. I just use the button name (without the leading cmd) to refer to what procedure the button will call when clicked, however some procedures take parameters and others don't. That's where I was going to use the Tag property - if it's "" then no param, otherwise some code indicating what I need... If there's no way to store additional info I guess I'll just make all the procedures with parameters and just not use them for some. I could also hardcode the name of the procedures and their characteristics but I wanted to make it more flexible (for possible future use). Thanks for the reply. George -----Original Message----- George, The help refers to userform commandbuttons. What extra info do you need to store, as it is event driven you know when it is clicked. -- HTH Bob Phillips "George" wrote in message ... Hi, Can anyone tell me why there's no friggin' tag property with the command button in Excel even though it's listed in help?! Is there any way to store extra info with a command button in Excel?? George R. . |
command button
The activeX controls themselves do not have a tag property. They inherit it
from the container object (the control object on a userform). In a worksheet they are contained in an OleObject which does not have a TAG property. -- Regards, Tom Ogilvy "Bill Lunney" wrote in message ... Both the forms controls and the ActiveX controls you use on the worksheet do not have the tag property. It is only present when used on a user form. Not sure of the reason why as my thought would also be that an ActiveX control would expose all of it's properties, the tag being one of them. Unless of course the ActiveX buttons used on the Worksheet are somehow different from the ones used on the forms. Never thought about this till this post. Anyway bottom line is tag is out for storage when used on a form. I would put data in a named cell underneath the commandbutton on the worksheet. -- Regards, Bill Lunney www.billlunney.com "George" wrote in message ... Hi, Can anyone tell me why there's no friggin' tag property with the command button in Excel even though it's listed in help?! Is there any way to store extra info with a command button in Excel?? George R. |
command button
Cheers for clearing that up. Never knew how it worked.
-- Regards, Bill Lunney www.billlunney.com "Tom Ogilvy" wrote in message ... The activeX controls themselves do not have a tag property. They inherit it from the container object (the control object on a userform). In a worksheet they are contained in an OleObject which does not have a TAG property. -- Regards, Tom Ogilvy "Bill Lunney" wrote in message ... Both the forms controls and the ActiveX controls you use on the worksheet do not have the tag property. It is only present when used on a user form. Not sure of the reason why as my thought would also be that an ActiveX control would expose all of it's properties, the tag being one of them. Unless of course the ActiveX buttons used on the Worksheet are somehow different from the ones used on the forms. Never thought about this till this post. Anyway bottom line is tag is out for storage when used on a form. I would put data in a named cell underneath the commandbutton on the worksheet. -- Regards, Bill Lunney www.billlunney.com "George" wrote in message ... Hi, Can anyone tell me why there's no friggin' tag property with the command button in Excel even though it's listed in help?! Is there any way to store extra info with a command button in Excel?? George R. |
All times are GMT +1. The time now is 01:57 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com