Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Close all code windows

Status
Not open for further replies.

TrekBiker

Technical User
Nov 26, 2010
330
GB
I'd like to be able to close all open code windows using a keyboard shortcut

Tried this but nothing seemed to happen when hitting Shift + Control + Q

Code:
Submacro +^Q
RunCode Function Name CloseWindows()
StopMacro

with
Code:
Public Function CloseWindows()
Dim aob As AccessObject

With CurrentProject
   For Each aob In .AllModules
       If aob.IsLoaded Then
           DoCmd.Close acModule, aob.Name, acSaveYes
       End If
   Next aob
End With

End Function
 
Ah, found that holding CTRL+F4 does the job.

This works fine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top