SeanL
New Member
- Joined
- May 20, 2003
- Messages
- 12
I’m new to VBA and I’m having a few difficulties getting my head around some of the concepts (I have no other programming experience). I am using Excel 2002 Bible by Brian Underdahl and John Walkenbach as a reference. One example given in the book is as follows:
MsgBox ActiveSheet.Comments(1).Parent.Address
The explanation given is: Comments(1) returns the first Comment object in the Comments collection. The Parent property of the Comment object returns its container, which is a Range object. The message box displays the Address property of the Range.
It then goes on to say that the fact that a property can return an object is an important concept in VBA programming.
I’m having difficulty understanding this concept – can anybody explain it to me? Maybe the book I’m using is not the best available, especially for getting to grips with the basic fundamentals? Can anybody recommend a better book for beginners?
MsgBox ActiveSheet.Comments(1).Parent.Address
The explanation given is: Comments(1) returns the first Comment object in the Comments collection. The Parent property of the Comment object returns its container, which is a Range object. The message box displays the Address property of the Range.
It then goes on to say that the fact that a property can return an object is an important concept in VBA programming.
I’m having difficulty understanding this concept – can anybody explain it to me? Maybe the book I’m using is not the best available, especially for getting to grips with the basic fundamentals? Can anybody recommend a better book for beginners?