Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Project Still Open When Workbook is Closed

I am having a problem where I use the command "ActiveWorkbook.Close".
For some reason it leaves the project open. By all appearances the
workbook is closed. I do not see the workbook open, and it is not
listed in the Window menu.

I am trying to clean up all loose ends where I am using both Excel &
Word macros that refer to each other. I had to play around with what
was visible and active, and think I have that in hand. (Occasionally
I will find the Microsoft Explorer is in the foreground when I am
pulling up a UserForm from Word, but it is very seldom and I am not
sure what is causing this. I can live with this.) The problem is when
I run these macros several times consecutively. Then I start getting
VBA errors on an activate command or the get command. If I close Word
and Excel, and then reopen everything it does not fix this. Any
variables I set to the application, I reset to "nothing". As I
mentioned above, my Excel project retains multiple copies of the same
project which should have closed down when the workbook was closed.

Does anybody know what I am not 'cleaning up' properly?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Project Still Open When Workbook is Closed

I forgot to mention that I can tried to delete the Excel.exe process
and sometimes this had helped. I am not sure if I am passed that
though. It has not been working recently so I have tried both the
Excel.exe & the Winword.exe. For whatever reason, my macros
definitely do not like it when I delete the Winword.exe process. I
start freezing on the get command to open the Word application.

I am finally forced to reboot, and then everything works fine & I
start all over.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Project Still Open When Workbook is Closed

I just completed a reboot and ran the macro.
1. When I ran the Excel macro, it opened the Word application then a
document, then made Excel not visible, and ran the Word macro. This
macro starts off by asking for user input from a UserForm. All I saw
was the Microsoft Explorer while the Word application and UserForm was
hidden behind this.
2. When I reopened Excel after everything was done, I get the message
"Personal.xls is locked for editing." (This is where my macro is
stored.)

As I keep playing with commands I get different items at different
times, so I am not sure what the issues are.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA project does not close when workbook is closed SimonN Excel Programming 5 July 1st 20 05:47 AM
VBA project does not close when workbook is closed Simon Norris Excel Programming 5 March 2nd 16 05:34 PM
How to: Open closed workbook/Search data tables/Return data to open workbook Hugh Adams Excel Discussion (Misc queries) 0 August 18th 10 02:04 PM
VBA project does not close when workbook is closed SimonN Excel Programming 3 October 25th 04 09:23 PM
Project stays in VBEditor when workbook is closed Tod Excel Programming 1 April 7th 04 02:34 PM


All times are GMT +1. The time now is 03:46 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"