COSE ACTIVE WINDOW

  • Thread starter Thread starter Victor and TJ Friedmann
  • Start date Start date
V

Victor and TJ Friedmann

In some cases I have a second ppt show on top of a previous one. I tried to
write a macro to put in the second show so that I could close that show
without closing the first show:

Sub closewindow()
Active.Window.Close
End Sub

Nothing happers. What's wrong?

Thanks,

Vic
 
In some cases I have a second ppt show on top of a previous one. I tried to
write a macro to put in the second show so that I could close that show
without closing the first show:

Sub closewindow()
Active.Window.Close
End Sub

Nothing happers. What's wrong?

Thanks,

Vic

Try taking the period out between Active and Window:

ActiveWindow.Close

--David
--
David M. Marcovitz
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
Microsoft PowerPoint MVP
Associate Professor, Loyola University Maryland
 
Thanks for pointing out the period. Actually, I found that the proper
command is ActivePresentation.Close.

Thank you for your help.

Vic
 
Yes, ActivePresentation.Close is probably what you want. They both work in
different ways and different circumstances. When you have a problem like
this, you might try going to the Debug menu and choosing Compile VBA
Project. It will pop up error messages on some lines like this. On rare
occasions, the error messages are actually useful.
--David

Thanks for pointing out the period. Actually, I found that the proper
command is ActivePresentation.Close.

Thank you for your help.

Vic

--
David M. Marcovitz
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
Microsoft PowerPoint MVP
Associate Professor, Loyola University Maryland
 
Thanks, David. I appreciate your help.

Vic



David Marcovitz said:
Yes, ActivePresentation.Close is probably what you want. They both work in
different ways and different circumstances. When you have a problem like
this, you might try going to the Debug menu and choosing Compile VBA
Project. It will pop up error messages on some lines like this. On rare
occasions, the error messages are actually useful.
--David



--
David M. Marcovitz
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
Microsoft PowerPoint MVP
Associate Professor, Loyola University Maryland
 
Back
Top