Solved

Property

Posted on 2000-05-11
6
232 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
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!

 
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 20 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Suggested Solutions

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

734 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