![]() |
List of property names and values for a given Object
I am trying to remember how to list all of the property names and values for
a given object. eg. I want to list all of the properties for a given cell range; the names of the properties and their values. Thank you Michael |
List of property names and values for a given Object
refer to the excel object model to be sure what "ALL" you want but generic
approach = you want to cycle through the properties collection of the Cell/Range object... getting Name and value dim myCell as range dim MyProp as object set mycell = your address here for each myprop in cell.properties msgbox prop.name msgbox prop.value next myprop "MichaelMalone" wrote: I am trying to remember how to list all of the property names and values for a given object. eg. I want to list all of the properties for a given cell range; the names of the properties and their values. Thank you Michael |
List of property names and values for a given Object
Thanks "Vacation's Over", but ".Properties" is not a valid property or method
in Excel 2002. Is this a property of the most recent version of Excel ? Yours Michael "Vacation's Over" wrote: refer to the excel object model to be sure what "ALL" you want but generic approach = you want to cycle through the properties collection of the Cell/Range object... getting Name and value dim myCell as range dim MyProp as object set mycell = your address here for each myprop in cell.properties msgbox prop.name msgbox prop.value next myprop "MichaelMalone" wrote: I am trying to remember how to list all of the property names and values for a given object. eg. I want to list all of the properties for a given cell range; the names of the properties and their values. Thank you Michael |
List of property names and values for a given Object
Sorry. I put code in for generic property search then adjusted for your cell
question. The answer I think is NO. To see why step into my code (F8) and once past the line set mycell = your address here ' (try activecell) rightclick on mycell in code and add a watch, at the bottom of the page you will see all the information Excel tracks about that cell. Way too much to represent in a property dump. This view may be what you were looking for and/or will give you ideas on what is available and how to access specifics in code. Good luck "MichaelMalone" wrote: Thanks "Vacation's Over", but ".Properties" is not a valid property or method in Excel 2002. Is this a property of the most recent version of Excel ? Yours Michael "Vacation's Over" wrote: refer to the excel object model to be sure what "ALL" you want but generic approach = you want to cycle through the properties collection of the Cell/Range object... getting Name and value dim myCell as range dim MyProp as object set mycell = your address here for each myprop in cell.properties msgbox prop.name msgbox prop.value next myprop "MichaelMalone" wrote: I am trying to remember how to list all of the property names and values for a given object. eg. I want to list all of the properties for a given cell range; the names of the properties and their values. Thank you Michael |
List of property names and values for a given Object
Thanks for trying "Vacation's Over".
"Vacation's Over" wrote: Sorry. I put code in for generic property search then adjusted for your cell question. The answer I think is NO. To see why step into my code (F8) and once past the line set mycell = your address here ' (try activecell) rightclick on mycell in code and add a watch, at the bottom of the page you will see all the information Excel tracks about that cell. Way too much to represent in a property dump. This view may be what you were looking for and/or will give you ideas on what is available and how to access specifics in code. Good luck "MichaelMalone" wrote: Thanks "Vacation's Over", but ".Properties" is not a valid property or method in Excel 2002. Is this a property of the most recent version of Excel ? Yours Michael "Vacation's Over" wrote: refer to the excel object model to be sure what "ALL" you want but generic approach = you want to cycle through the properties collection of the Cell/Range object... getting Name and value dim myCell as range dim MyProp as object set mycell = your address here for each myprop in cell.properties msgbox prop.name msgbox prop.value next myprop "MichaelMalone" wrote: I am trying to remember how to list all of the property names and values for a given object. eg. I want to list all of the properties for a given cell range; the names of the properties and their values. Thank you Michael |
All times are GMT +1. The time now is 05:16 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com