Daniel Murta Barros


hi people,

It's my first time here...and, i need help.

How can i make objects (module class - with atributes and methods) in excel 2003

I don't find help about this.

Thanks!





Re: Class / Object in Excel 2003

Tantani


Dear Daniel,

I recommend you to have a look at the following website and download the e-book named "Excel 2003 VBA Programmerí»s Reference". It is a very good book and you can learn the basic of defining objects, modules, classes, etc. in Excel 2003 easily.

Hope this helps!
  • www.itstudy8.org





Re: Class / Object in Excel 2003

Daniel Murta Barros

Thanks Tantani!

the e-book is great!

______________________________

class module - "People"

xxxxxxxxxxxxx

Option Explicit

Private csNome As String

Public Property Get getNome() As String
getNome = csNome
End Property
Public Property Let letNome(tsNome As String)
csNome = tsNome
End Property

________________________________

module 1

xxxxxxx

Option Explicit

Dim gnPeople as People

Sub teste()

Set gnPeople = New People

gnPeople.letNome = "Dan"

msgbox gnPeople.getNome

End Sub







Re: Class / Object in Excel 2003

Jon Peltier

The 2003 version of this reference had some issues (incorrect entries and awkward constructions. The 2000, 2002, or 2007 versions would be a better choice.