Hi,
what is a purpose of setting up public property?
like :
Where should i put this? In class module?Please Login or Register to view this content.
What this class name should be?
Best,
Jacek
Hi,
what is a purpose of setting up public property?
like :
Where should i put this? In class module?Please Login or Register to view this content.
What this class name should be?
Best,
Jacek
Generally yes you would put a property in a class. It really doesn't matter what you call it (though it's best to avoid VBA or Excel keywords)
Remember what the dormouse said
Feed your head
Couple of reasons,
creation of read/write, readonly and writeonly properties.
execution of additional code when reading and or writing properties.
Module
Class Class1Please Login or Register to view this content.
Please Login or Register to view this content.
thank you very much Andy and Rory!
Great explanation.
Jacek
Andy,
i am getting error in your code. Is should be:
And i have another error like here:Please Login or Register to view this content.
Screenshot_4.png
can you please help with this?
Jacek
Last edited by jaryszek; 04-11-2019 at 04:04 AM.
Andy's code was (as expected) correct as written - make sure you read the comments!
thank you.
So what is a purpose to get error here?
Jacek
It was to demonstrate read-only and write only properties.
aaa ok. Understand .
thank you!
Here is the code in a workbook.
The 2 compile lines are commented out.
I don't get the error you report so you must have added extra code.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks