Re: problems with let and get

Tech-Archive recommends: Fix windows errors by optimizing your registry





"senn" <senn@homeplace&.fix> wrote in message
news:uZxnCznmIHA.1212@xxxxxxxxxxxxxxxxxxxxxxx

"greg" <iuouh@xxxxxxxxx> skrev i meddelelsen
news:eGo7JylmIHA.2504@xxxxxxxxxxxxxxxxxxxxxxx
I have a class clsFile. And I have a let and get

Private mvarsFileLocation As String 'local copy

Public Property Let FileLocation(ByVal vData As String)
mvarsFileLocation = vData
End Property

Public Property Get FileLocation() As String
FileLocation = mvarsFileLocation
End Property

Your Let is defined as a Variant, whereas your Get is
defined as a String. Normally differences in these will
produce an error. You should append: As String
to the Let after the paranthesis - too.

senn


In another place I create a clsFile. then try and assign a filelocation.
dim sTempLoc as string
sTempLoc = "test"
cfile.FileLocation (sTempLoc)


however this gives an error.
And if I click on Filelocation and click definition, it goes to the get
method.
Why would it do that. and not the let method?
thanks for any help




Ever tried it yourself?

Dmitriy.


.



Relevant Pages

  • problems with let and get
    ... Private mvarsFileLocation As String 'local copy ... Public Property Let FileLocation(ByVal vData As String) ... Public Property Get FileLocation() As String ...
    (microsoft.public.vb.general.discussion)
  • Re: problems with let and get
    ... Private mvarsFileLocation As String 'local copy ... Public Property Let FileLocation(ByVal vData As String) ... Public Property Get FileLocation() As String ...
    (microsoft.public.vb.general.discussion)
  • Re: problems with let and get
    ... Private mvarsFileLocation As String 'local copy ... Public Property Let FileLocation(ByVal vData As String) ... Public Property Get FileLocation() As String ...
    (microsoft.public.vb.general.discussion)
  • Re: Open files from a dynamic path..
    ... I tried to insert the code, unfortunalty there's a compile-error which ... Arjan Bregman ... ByVal lpOperation As String, _ ... Dim filelocation As String ...
    (microsoft.public.excel.programming)
  • Re: problems with let and get
    ... Private mvarsFileLocation As String 'local copy ... Public Property Let FileLocation(ByVal vData As String) ... Public Property Get FileLocation() As String ...
    (microsoft.public.vb.general.discussion)