Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I deactivivate a workbook?
Hello all,
I can't figure out how to deactivate or minimize a workbook. Without getting too specific, basically I am intercepting the 'close' command until I exit the program and just want to deactivate the workbook the user was trying to close. I can't find any commands that will accomplish this. The workbook has an activate command (wb.Activate) but no deactivate. How can I do this? Thanks ahead of time, Marc |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I deactivivate a workbook?
thisworkbook.close
-- Don Guillett SalesAid Software "Marc" wrote in message om... Hello all, I can't figure out how to deactivate or minimize a workbook. Without getting too specific, basically I am intercepting the 'close' command until I exit the program and just want to deactivate the workbook the user was trying to close. I can't find any commands that will accomplish this. The workbook has an activate command (wb.Activate) but no deactivate. How can I do this? Thanks ahead of time, Marc |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I deactivivate a workbook?
Select another workbook.
One workbook needs to be "activated" -- Regards, Tom Ogilvy Marc wrote in message om... Hello all, I can't figure out how to deactivate or minimize a workbook. Without getting too specific, basically I am intercepting the 'close' command until I exit the program and just want to deactivate the workbook the user was trying to close. I can't find any commands that will accomplish this. The workbook has an activate command (wb.Activate) but no deactivate. How can I do this? Thanks ahead of time, Marc |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I deactivivate a workbook?
So it forces you to have an active workbook. I didn't know that. I guess
you can always default to the first workbook in the list. But is there any way to simply minimize the workbook? I think that would be the easiest thing to do. And I can't close it because then it severs my connection to the COM server. If there's a way to reconnect to the workbook after it's closed, I'm not aware of it. *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I deactivivate a workbook?
Marc,
I ran the macro recorder and got this (with a little tweak to change from Activewindow to the window for Book1). It minimizes Book1 but Book 1 is still the active workbook. Sub Macro1() Windows("Book1").WindowState = xlMinimized End Sub hth, Doug "Marc Nations" wrote in message ... So it forces you to have an active workbook. I didn't know that. I guess you can always default to the first workbook in the list. But is there any way to simply minimize the workbook? I think that would be the easiest thing to do. And I can't close it because then it severs my connection to the COM server. If there's a way to reconnect to the workbook after it's closed, I'm not aware of it. *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I deactivivate a workbook?
Yes, the xlMinimized was what I was looking for.
I'm not a VB guy, and I'm trying to integrate COM with Python, so it's a little difficult sometimes to find the magic command. As a result, I wasn't aware of the VB record function either, and that's mighty helpful also. Many thanks, Marc *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Refresh pivot table in workbook A when changing a cell in workbook | Excel Worksheet Functions | |||
Excel-how to link source workbook to copy of destination workbook | Excel Worksheet Functions | |||
Select sheet tabs in workbook & save to separate workbook files | Excel Worksheet Functions | |||
Excel Gurus = want a macro in 1 workbook to get info from another workbook = Read please | Excel Programming | |||
What commands do you use to name a workbook, save a workbook,open a workbook | Excel Programming |