That's just the way VBA is -- it opens the editor when you modify
a code module. Annoying, isn't it? You can write code to close
the window.
Application.VBE.MainWindow.Visible = False
You'll still get a flicker, but the window will close.
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"dallag"
wrote in message
...
Hi there,
After the VB lines of code (ran in Excel)
Bla bla bla
'/*/*/*/*/*/*/*/*/*/*/*/*/
'Insert a proc into Sheet1
'/*/*/*/*/*/*/*/*/*/*/*/*/
Dim Startline As Long
With ActiveWorkbook.VBProject.VBComponents("Sheet1").Co deModule
Startline = .CreateEventProc("Change", "Worksheet") + 2
InsertLines Startline, "call Update_residuals"
End With
End If
retest = False
Workbooks(glbMainTrialFileName & ".xls").Save
Unload Me
Exit Sub
the VB editor opens by magic ?
could anybody tell me why ?
Dallag
--
dallag
------------------------------------------------------------------------
dallag's Profile:
http://www.excelforum.com/member.php...o&userid=29762
View this thread:
http://www.excelforum.com/showthread...hreadid=494813