Solved

Property

Posted on 2000-05-11
6
209 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

708 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now