N
nkaposhilin
Hi,
I have the following code in regular mdule in Excel 2000 that is
supposed to automatically create some event procedures in a new workbook
that is being programatically created. The code runs fine but it opens
the VBE environment and flashes all the windows as the code is created.
I have set Application.ScreenUpdates to false already. Anyone have a
clue how I can prevent these VBE windows from opening at runtime.
Kind Appreciation to anyone who can help.
With tmpWorkbook.VBProject.VBComponents(report.CodeName).CodeModule
sts = .CreateEventProc("click", "CommandButton1")
Line = .ProcStartLine("CommandButton1_Click", vbext_pk_Proc)
.InsertLines Line + 1, "Essbase.RunReports
ActiveSheet.Range(" & """" & CascadeCell & """" & ").Value,
""A6"", 2"
End With
With
tmpWorkbook.VBProject.VBComponents(report.CodeName).CodeModule
sts = .CreateEventProc("click", "ComboBox1")
Line = .ProcStartLine("ComboBox1_Click", vbext_pk_Proc)
.InsertLines Line + 1, "sts = Essbase.Retrieve(True)" &
Chr(10) & _
"lblReportTitle.Caption = ""HEAD OFFICE REPORT FOR "" &
Range(""HOREPORT_PAGEHEADER3"").Value"
End With
I have the following code in regular mdule in Excel 2000 that is
supposed to automatically create some event procedures in a new workbook
that is being programatically created. The code runs fine but it opens
the VBE environment and flashes all the windows as the code is created.
I have set Application.ScreenUpdates to false already. Anyone have a
clue how I can prevent these VBE windows from opening at runtime.
Kind Appreciation to anyone who can help.
With tmpWorkbook.VBProject.VBComponents(report.CodeName).CodeModule
sts = .CreateEventProc("click", "CommandButton1")
Line = .ProcStartLine("CommandButton1_Click", vbext_pk_Proc)
.InsertLines Line + 1, "Essbase.RunReports
ActiveSheet.Range(" & """" & CascadeCell & """" & ").Value,
""A6"", 2"
End With
With
tmpWorkbook.VBProject.VBComponents(report.CodeName).CodeModule
sts = .CreateEventProc("click", "ComboBox1")
Line = .ProcStartLine("ComboBox1_Click", vbext_pk_Proc)
.InsertLines Line + 1, "sts = Essbase.Retrieve(True)" &
Chr(10) & _
"lblReportTitle.Caption = ""HEAD OFFICE REPORT FOR "" &
Range(""HOREPORT_PAGEHEADER3"").Value"
End With