?
Solved

Property

Posted on 2000-05-11
6
Medium Priority
?
245 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
Industry Leaders: 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 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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month13 days, 3 hours left to enroll

777 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