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

2 responses to “Create ActiveX Control

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s