Re: About Sub Main( )
- From: "Alex Dybenko" <alexdyb@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 24 Apr 2008 20:50:45 +0400
Hi
just leave code as is, perhaps change global to public
then change Sub Main() to Function Main() and create autoexec macro which call it
--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
"March" <March@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:DA84DDD3-ECCE-47FC-94C9-D669441B16F8@xxxxxxxxxxxxxxxx
Hello,
Anyone know about sub main( ) VBA in MS Access. I used to write some code
on VB6. I wrote
Option Explicit
Global db as database
Sub main( )
source = "C:\<filename>.mdb"
share = false
Set db = dbengine.workspaces(0).opendatabase(source, share)
<formname>.show
End Sub
above I could use "db" anywhere in my application.
Any idea to declare the "Global" in VBA.
I try to covert the source code to vba. I know that may have some
differences from VB6.
Also, I try to find reference websites.
If anyone have ideas, please give me suggestion.
.
- Follow-Ups:
- Re: About Sub Main( )
- From: March
- Re: About Sub Main( )
- References:
- About Sub Main( )
- From: March
- About Sub Main( )
- Prev by Date: Re: Need a little advice on frontend setup
- Next by Date: Re: "enter" after combo box entry
- Previous by thread: About Sub Main( )
- Next by thread: Re: About Sub Main( )
- Index(es):
Relevant Pages
|