Link to home
Start Free TrialLog in
Avatar of seahpc
seahpc

asked on

Sub Main

Hi,

   How to declare a sub main function,
   I using ActiveX exe project.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of phiro
phiro

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of alokanant
alokanant

Add a module and add the following declaration -
private sub main
' your code here
end sub

i think you shall be placing code for initialising global variables or constants, in this.

hth
alok.
Add standard module to you project

Insert code to module:
 
Sub main()
  'Your code
End Sub

Go to:
"Project->Project Properties" menu
and change  "Startup Object" to "Sub Main"


Run the Project

Enjoy!

Daniel