• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 188
  • Last Modified:

How run code without an event in VB?


Hi-

I have some code I need to run in VB.  The code does not require an event - is there a way for me to run it without having to create an event (e.g. a button called "Run the darn code")?
I just want to debug the code without having to create any controls on a form...
0
SAbboushi
Asked:
SAbboushi
1 Solution
 
vinnyd79Commented:
You can put the code in a module under Sub Main() and then right click on the project in the project explorer window and select properties. Then set the Startup object to Sub Main()

0
 
g_johnsonCommented:
or in a form load event ...
0
 
SAbboushiAuthor Commented:
Thanks for the help folks-
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now