Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / December 2007

Tip: Looking for answers? Try searching our database.

Close VBA Project

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tcb - 21 Dec 2007 13:23 GMT
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?
Jim Rech - 21 Dec 2007 14:24 GMT
It's a long time peculiarity of the VBE that it does not always seem to know
that a given project's workbook has been closed.  It's annoying but it does
no harm as far as I know.

Signature

Jim

|I am creating a command button then adding code with this syntax.
|
[quoted text clipped - 10 lines]
| But the "Microsoft Visual Basic - VBA Project" remains open.  What is
| the syntax to close it?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.