Re: problems with let and get
- From: "Jeff Johnson" <i.get@xxxxxxxxxxx>
- Date: Wed, 9 Apr 2008 13:36:37 -0400
"greg" <iuouh@xxxxxxxxx> wrote in message
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
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?
Because you don't understand how properties work. They are not called like
methods; they are called like they're variables. I.e., for assignment, you
ALWAYS use the = sign. "Nobody" gave you the syntax.
.
- References:
- problems with let and get
- From: greg
- problems with let and get
- Prev by Date: Re: VB transformation to SQL Server datetime
- Next by Date: Stainless Steel with Plastic Bracelet KB649 Wholesale Show
- Previous by thread: Re: problems with let and get
- Next by thread: Re: problems with let and get
- Index(es):
Relevant Pages
|