Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - Is it possible to use Object.Object notation in vbscript ?

Reply
 
Old 06-22-2009   #1 (permalink)
Harold Little


 
 

Is it possible to use Object.Object notation in vbscript ?

If I create two or more classes, is it possible to use,
X = Object.Object.propperty ?

Such as Word application object accessing the Document object property



My System SpecsSystem Spec
Old 06-22-2009   #2 (permalink)
mayayana


 
 

Re: Is it possible to use Object.Object notation in vbscript ?

Quote:

> If I create two or more classes, is it possible to use,
> X = Object.Object.propperty ?
>
> Such as Word application object accessing the Document object property
>
Yes. For instance window.event.srcElement
with the IE DOM. But you seem to be mixing
up classes and objects. Maybe you've got a .Net
background? I think that .Net refers to classes
where VBS/COM refers to objects.

In VBS a class has a more specific definition.
It's a script class. You could also reference a
hierarchy of those if you like:

Dim Cls1

Set Cls1 = New C1
Cls1.C1C2.SomethingOrOther
Set Cls1 = Nothing

Class C1
Public Property Get C1C2()
Set C1C2 = New C2
End Property
End Class

Class C2
Public Sub SomethingOrOther()
MsgBox "OK"
End Sub
End Class




My System SpecsSystem Spec
Old 06-22-2009   #3 (permalink)
Harold Little


 
 

Re: Is it possible to use Object.Object notation in vbscript ?

Yes, that's what I was looking for....
Thanks so much...

"Harold Little" <harold.little@xxxxxx> wrote in message
news:%23x2TTX18JHA.1340@xxxxxx
Quote:

> If I create two or more classes, is it possible to use,
> X = Object.Object.propperty ?
>
> Such as Word application object accessing the Document object property
>

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Inherit from usercontrol - Object not set to instance of an object .NET General
Microsoft VBScript runtime error: Object doesn't support this property or method: 'WScript.Sleep' VB Script
datalist -- Object reference not set to an instance of an object. .NET General
Testing object arrays using Compare-Object and -contains PowerShell
Adding canonical aliases for Compare-Object, Measure-Object, New-Object PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46