Close various modules/codes windows

F

Faraz A. Qureshi

Whenever, I open the VBE (Alt+F11) I find most of the code windows already
opened and have to close each and everyone by entering Ctrl+F4 and finally
opening a single module on which I seek to work upon.

Any guidance, help and relevant idea by u experts in this regard shall
highly be obliged.
 
J

Jacob Skaria

--How many open VBA projects do you see in Project Explorer?

--Check out whether you have any projects getting opened during startup. If
so remove them from your Book.xlt in XLSTART

XLSTART folder usually located at
C:\Documents and Settings\username\Application Data\Microsoft\Excel\XLSTART

--Also check out Tools>AddIns> to see whether you have checked some working
files.
 
F

Faraz A. Qureshi

Hi Jacob!

Nice to hear from u! Sure did miss u for couple of days!

No Doubt I have several add-ins I need, some examples are:
PatternFills.xlam
PersonalTests.xlam

I want them to remain opened+used but it is only the several CODE windows of
each and every module of the same that I want to remain closed, when I start
VBE however, the projects remaining to be active.

Furthermore, no one has helped me out in my previous posts! Please let me
know that if I need to distribute an addin I can't find the "Package &
Deployment Wizard" under the add-ins manager in the VBE.

Any idea where to locate the same on net and downloaded?

Thanx again brother!
 
J

Jacob Skaria

One way is to lock your project from being viewed and if needed password
protect (VBE>Tools>project properties)

Busy these days...will go through your other posts if time permits...
 
P

Peter T

You could try something like this, perhaps in your personal linked to a
button on the VBE menu (eg CloseAll in the Windows dropdown)

Sub CloseCodeWindows()
'' with ref to Extensibility
'Dim objVBE As VBIDE.VBE
'Dim objWin As VBIDE.Window

'' without the ref
Dim objVBE As Object
Dim objWin As Object
Const vbext_wt_CodeWindow As Long = 0&

Set objVBE = Application.vbe
For Each objWin In objVBE.Windows
If objWin.Type = vbext_wt_CodeWindow Then
objWin.Visible = False
End If
Next
End Sub

You might search out MZ-Tools which includes this and much more.

AFAIK the "Package & Deployment Wizard" was only supplied with VB6 and
earlier, nothing equivalent with Office/VBA.

Regards,
Peter T
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top