![]() |
|
||||||||
| Site Links |
| Consulting |
| Knowledge Base |
| Training |
| Forum |
| Articles |
| Resources |
| Products |
| Cool Tools |
| Contact |
| About Us |
| Go to Page... |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
|
Hello all,
this is a overall VB-Q (I did not find a solution for VB 6 nor VBA ):I want to export all properties of an object at runtime. So let's say I have: VBA:
VBA tags courtesy of www.thecodenet.com
Now I can view all properties of myTxt in the local window. But how can I export them in a way, that another program could read it (so PrtScr is not an option)?? Thanks Daniel |
|
Local Time: 10:55 AM
Local Date: 05-25-2013 Location:
|
|
|
|
#2 |
|
Site Admin
The Princess |
I moved it to the appropriate forum, Daniel.
![]() ~Anne Troy |
|
Local Time: 05:55 AM
Local Date: 05-25-2013 Location:
|
|
|
|
#3 |
|
BoardCoder
Licensed Coder |
If you know what object you are looking at, then the answer is fairly simple. Otherwise, however, I think it would be harder. I can't think of any way to easily loop through every property of an object, so I'm thinking the only way would be to read the info from the type library, which I can't say I've tried before. That, plus I'm
as it's late Friday night, and I'm inclined to ask why do you want to do this?![]() "Computers are useless. They can only give you answers." - Pablo Picasso Mark Rowlinson FIA | The Code Net | Professional Office Developers Association |
|
Local Time: 10:55 AM
Local Date: 05-25-2013 Location:
|
|
|
|
#4 |
|
|
Well, basically I'm looking for a way to export all properties of 2 controls (at runtime) to Excel to easily compare them. Because one of them does work, another one does not.
But the original purpose is not so urgent anymore, but I was wondering, whether there is a way to export those properties (maybe a loop or something like that). Daniel |
|
Local Time: 10:55 AM
Local Date: 05-25-2013 Location:
|
|
|
|
#5 | ||||||||||||||||||
|
MS Excel MVP
|
Try downloading the Type Lib utilities file available at Chip's site:
http://cpearson.com/excel.htm From the site:
Regards, Juan Pablo Gonz?lez |
||||||||||||||||||
|
Local Time: 03:55 AM
Local Date: 05-25-2013 Location:
|
|
|
|
#6 |
|
|
Thanks for the tip Juan
, but unfortunately I can't yet get it to work with Excel 97 (that does not support Enums ). I'll try to find a way around that... |
|
Local Time: 10:55 AM
Local Date: 05-25-2013 Location:
|
|
|
|
#7 | |||||||||||||||||||||||
|
|
I have not looked at Chip's stuff, but I'll make a few comments: 1. It's not hard to get a list of controls, but getting a list of the properties for each control (without going thru a type library) is likely impossible. 2. Unless you have an absolute need to use Excel 97 for a particular reason, you should upgrade to a more recent version of Office if only to be able to use the extra goodies in VB/VBA 6. |
|||||||||||||||||||||||
|
Local Time: 04:55 AM
Local Date: 05-25-2013 |
|
|
|
#8 |
|
|
I'd like to upgrade, too, but unfortunately that's not my decision...
|
|
Local Time: 10:55 AM
Local Date: 05-25-2013 Location:
|
|
|
|
#9 | |||||||||||||||||||||||
|
MS Excel MVP
|
Not a huge deal... just need to change all the enums to public constants. Regards, Juan Pablo Gonz?lez |
|||||||||||||||||||||||
|
Local Time: 03:55 AM
Local Date: 05-25-2013 Location:
|
|
|
|
#10 |
|
|
Thank you Juan! I'll try to test / use this as soon as I can look over the pile of work on my desk again which may take a while...
Nevertheless, I'll mark this thread solved. |
|
Local Time: 10:55 AM
Local Date: 05-25-2013 Location:
|
|
|
|
#11 |
|
|
Do not use
myBox as TextBox or something like that. Say myBox as Object and use the basic (classes/types/properties) to loop through all objects and classes. (parent, class, name, next, text, caption, property, ...) you can hangle through to check all properties of all available and connected objects. |
|
Local Time: 10:55 AM
Local Date: 05-25-2013 Location:
|
|
![]() |
| Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|


