Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If I have a procedure that takes as input an object, how do I
programmatically check to see if that object has a height property? Function CheckForHeightProperty(InputObject as Object) ?? How do I check to see what properties this object has? Is there any way to enmurate them programmatically?? End Function |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I'd do it the brutal way; ask for it and check for errors: Function HasHeight(InputObject As Object) As Boolean Dim D As Double On Error Resume Next D = InputObject.Height If Err.Number = 0 Then HasHeight = True End Function Sub test() MsgBox HasHeight(ActiveSheet.Rows(4)) MsgBox HasHeight(UserForm1) MsgBox HasHeight(Application.AnswerWizard) End Sub HTH. Best wishes Harald "J" skrev i melding ... If I have a procedure that takes as input an object, how do I programmatically check to see if that object has a height property? Function CheckForHeightProperty(InputObject as Object) ?? How do I check to see what properties this object has? Is there any way to enmurate them programmatically?? End Function |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Object property/method problem | Excel Discussion (Misc queries) | |||
Lookin property of the FileSearch object | New Users to Excel | |||
Page Object property | Excel Programming | |||
Object not supporting property or method | Excel Programming |