Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Property

Posted on 2000-05-11
6
Medium Priority
?
251 Views
Last Modified: 2013-11-23
Hello, I have a class where i try to create a property. I have this declarations.

Private Au_Id as integer


Property Let SetName(vNew as variant)..
Au_Id = vNew
end property

Property Get SetName ....
UID = Au_Id
end property


The assignment to Au_Id works but when it access teh Get procedure thevalue of Au_Id is set to Nothing. Why ?
0
Comment
Question by:vnd
  • 3
  • 2
6 Comments
 
LVL 43

Expert Comment

by:TimCottee
ID: 2799769
Private Au_Id as integer

Property Let SetName(vNew as variant)..
  Au_Id = vNew
end property

Property Get SetName() As Integer
  'UID = Au_Id
  'Should be
  SetName = Au_Id
end property


0
 
LVL 1

Expert Comment

by:manchula
ID: 2799773
Au_ID is not set to nothing.

The proc must be,

Property Get SetName ....
SetName = Au_Id
end property
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 2799796
manchula, I just said the same thing, it is considered bad form to "jump" for points. Whilst 20 points may not be anything to worry about, the principles of the site are to expand knowledge and skills. Posting answers straightaway especially when the answer you post has already been given as a comment is not considered good behaviour. I know that you are relatively new to EE but I would suggest that you don't continue to jump in in this way otherwise you risk complaints regarding your behaviour.

A questioner has the ability to "Accept a comment as answer" so there really is no need to post answers in this manner. This is the second occasion that I have noticed you posting an answer without adding significantly to previous comments, and in this case repeating what was already said.

vnd,

If you are happy with my answer, please reject manchula's and accept my comment or ask for further clarification. I will be happy to help if you need more information on why your original code didn't work and why the suggested solution will.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 1

Expert Comment

by:manchula
ID: 2799860
Timcotte, did you check the time of my posting? There's only a minute difference between yours and mine. Do you think that I copied your comment & made that as answer? If so, sorry I can't help you.
0
 
LVL 43

Accepted Solution

by:
TimCottee earned 80 total points
ID: 2799875
I can see that you did not just copy my comment! I am merely pointing out that posting an answer in this way is not necessarily helpful.

In similar cases, I have found that most "experts" would apologise on realising that someone else had already made the same comment/answer or at least recognise the fact that someone else has done so.
0
 

Author Comment

by:vnd
ID: 2800051
Thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question