DBEngine in Form's macro

  • Thread starter Thread starter Alan T
  • Start date Start date
A

Alan T

I have several sub functions in my form's macro page, some of the sub
function has the following codes:
Dim myDB As Database
myDB = DBEngine.Workspaces(0).Databases(0)

Can I have these codes in more than one sub function?
 
Alan,

This is not a macro. This is part of a VBA procedure. And yes, you can
use this code within more than one procedure.
 
Back
Top