Create ActiveX Control


1. Create project and choose ActiveX Control template, save with name Jam;

2. And save your control user with name ControlJam;

3. Create  control label and component timer.

and here code:

Private sub lblJamz_DblClick()

msgbox “Time” & Time & vbCrlf & “Date” & Date,vbInformation,”ActiveXControl”

End Sub

Private sub tmr_timer()

lblJa.Caption=Time

End Sub

Private sub UserControl_Initialize()

tmr.Interval=1000

tmr.enabled=true

lblJam.Caption=Time

lblJam.ToolTipText=Now

End Sub