Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default Problems Setting properties of class module

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



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default Problems Setting properties of class module

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...
--
HTH...

Jim Thomlinson


"Andibevan" wrote:

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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default Problems Setting properties of class module

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

"Jim Thomlinson" wrote in message
...
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...
--
HTH...

Jim Thomlinson


"Andibevan" wrote:

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






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CLASS MODULE & SIMPLE MODULE FARAZ QURESHI Excel Discussion (Misc queries) 1 September 7th 07 09:32 AM
class module? sybmathics Excel Programming 17 February 25th 06 02:29 PM
Class Module for setting Automatic Calc GregR Excel Programming 6 May 6th 05 12:21 AM
Variable from a sheet module in a class module in XL XP hglamy[_2_] Excel Programming 2 October 14th 03 05:48 PM


All times are GMT +1. The time now is 11:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"