Re: Question from a Newbie - property set/get

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Yes, I do need "sleep". :-)

My attempt was a silly copy and paste error:

Public Property Let CurrentX(inX As Variant)
m_Printer.CurrentX = CSng(inX)
End Property

Public Property Get CurrentX() As Variant
CX = CSng(m_Printer.CurrentX)
End Property

I failed to change the destination variable. :-(

My first attempt at "anything" in VB was to wrap the VB printer object
in an ActiveX dll. I did this about 3 years ago and have got a lot of
use from it in ObjRexx; however, it has come to my attention recently
that there are probably more VBScript folks using it than Rexx users.

Since it seems to be catching on a bit, I wanted to clean up a lot of
my "patch" code from days gone by.

Stay tuned for probably more questions.

Lee

On Mon, 2 May 2005 22:22:53 -0400, "MikeD" <nobody@xxxxxxxxxxx> wrote:

>Apparently, you did try long enough or hard enough. What DID you try? What
>error did you get? I'm not trying to ridicule you, but logically the first
>thing to *try* would be to use the same property name.
>
>But then again, you mentioned Set and Get in your subject, but your code
>included Let and Get (no Set at all). I'm lost. Perhaps you just need to get
>a good night's sleep? <g>

.



Relevant Pages