VBA- adding custom properties to Label controls

mahhdy

Board Regular
Joined
Sep 15, 2016
Messages
86
Hi,

I need to assing some properties to my labels which are generated on runtime (on a Class Module). I am using their TAG and Controltiptext properties, I need some more proterties to set and control these labels during the runtime. I am not sure If i should use some property procedures. If soI don't have any experience on that. The properties I am looking now are these three: 1) bdg, 2) lstjob and 3) opnjobs. Can anybody help? I want to assign value to these properties on creation time (load) and afterward as their status changed. The user can drag and drop these labels among different project and tasks, so I need to keep track their dependencies!

regards,
M
 
Last edited:

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Hello,

I figure that out. I added Get and Let properties to my class for eaqch of those properties.
here is my code.
Code:
Private opnjobs$, lstJob$, bdg&, loc$
' Property Definitions
Public Property Get openJobs() As String
    openJobs = opnjobs
End Property
Public Property Let openJobs(Value As String)
    opnjobs = Values
End Property
Public Property Get LastJob() As String
    LastJob = lstJob
End Property
Public Property Let LastJob(Value As String)
    lstJob = Value
End Property
Public Property Get Badge() As Long
    Badge = bdg
End Property
Public Property Let Badge(Value As Long)
    bdg = Value
End Property
Public Property Get Location() As String
    Location = loc
End Property
Public Property Let Location(Value As String)
    loc = Value
End Property
regards,
M
 
Upvote 0

Forum statistics

Threads
1,224,815
Messages
6,181,135
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top