Sub Main in Windows App

  • Thread starter Thread starter swartzbill2000
  • Start date Start date
S

swartzbill2000

Hello,
I have a Windows App. I want to change my startup to Sub Main. How do
you run a Windows App from Sub Main?
Bill
 
Hello,
I have a Windows App. I want to change my startup to Sub Main. How do
you run a Windows App from Sub Main?
Bill

Create a module, place

Public Sub Main()

End Sub

In it, then go to project properties and change the startup to Main

Chris
 
I have a Windows App. I want to change my startup to Sub Main. How do
you run a Windows App from Sub Main?

In addition to the other replies, simply create a 'Sub Main', set the
application's startup object to "Sub Main" in the project properties and use
'Application.Run(<form>)' to display the main form.
 
Back
Top