T
tcb
I am creating a command button then adding code with this syntax.
With objActiveWkb.VBProject.VBComponents("Sheet1").CodeModule
StartLine = .CreateEventProc("Click", strButtonName) + 1
.InsertLines StartLine, _
" Sheets(" & """" & rsCoverSheet!TabName & """" &
").Select" & vbCrLf
End With
The spreadsheet is created, the button is created, the code is
created, the spreadsheet is saved and closed.
But the "Microsoft Visual Basic - VBA Project" remains open. What is
the syntax to close it?
With objActiveWkb.VBProject.VBComponents("Sheet1").CodeModule
StartLine = .CreateEventProc("Click", strButtonName) + 1
.InsertLines StartLine, _
" Sheets(" & """" & rsCoverSheet!TabName & """" &
").Select" & vbCrLf
End With
The spreadsheet is created, the button is created, the code is
created, the spreadsheet is saved and closed.
But the "Microsoft Visual Basic - VBA Project" remains open. What is
the syntax to close it?