You can close the VBE Automatically like this:
Code:
--------------------
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Set MyVBe = ThisWorkbook.VBProject
If MyVBe.Mode = vbext_vm_Run Then
MyVBe.VBE.MainWindow.Visible = False
End If
End Sub
--------------------
Jarek Kujawa;508001 Wrote:
Hi,
1. I open a file, write some code, then close the file
2. even though the file was closed it's code is still viewable in
Project - VBA Project window, as if the file was still open
the only way I know to have the file REALLY closed in Project - VBA
Project window is to Exit and re-start Excel
does anyone know a better way?
TIA
--
Simon Lloyd
Regards,
Simon Lloyd
'Microsoft Office Help' (
http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile:
http://www.thecodecage.com/forumz/member.php?userid=1
View this thread:
http://www.thecodecage.com/forumz/sh...d.php?t=139660