Problems Setting properties of class module

A

Andibevan

Hi All,

I have a class module called DosOutputs. Here is one of the properties:-

Public Property Let CommandLine(DOSCommand As String)
mCommand = DOSCommand
End Property

I get the error "invalid use of property" when I try to set this property as
follows:-

objDOS.CommandLine = txtCommand.Text

What am I doing wrong?

Ta

Andi
 
G

Guest

There has to be more to it than what we are seeing. I created the exact same
code at my end and it works fine. How is m_Command declared? String, Integer,
???

Try changing
objDOS.CommandLine = txtCommand.Text
To
objDOS.CommandLine = "Test"
Just to see if that helps...
 
A

Andibevan

Your completely right - I managed to work it out on the train home - I had
missed a declaration out - thanks again for your suggestions.

Do you know of any good guides to class modules? I have another problem
with custom events and Raiseevent but I want to do some reading before I
post lots of questions..

Thanks again

Andi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top