VBA Prob

AndyShuter

Registered User.
Local time
Today, 16:59
Joined
Mar 3, 2003
Messages
151
When I open VBA from Access, all of the code windows open for all of the forms and modules - and I have to manually shut them all down if i want code window . Just wondered if there was a way of only opening the code window for the form that i am viewing, or no code windows at.

Many Thanks in Advance

Andy
 
With the subject form in the design view, press "ctl V", then "C".
 
Last edited:
sorry mate, i dont understand what u mean
 
Sorry, I had a typo. I corrected it in my earlier post.
 
Andy, just curious, is there a reason you want just one module open?
Is it too much overhead?
You asked, "or no code windows at all". None will open, uless you go to VBE
deliberately.

To opem manually, you can use Docmd.OpenModule "mdlHours"

To close, something like this?

Dim mdl As Object


For Each mdl In CurrentProject.AllModules

If mdl.Name <> VBE.ActiveCodePane.CodeModule Then
DoCmd.Close acModule, mdl.Name
End If

Next mdl
 

Users who are viewing this thread

Back
Top Bottom