View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
N10 N10 is offline
external usenet poster
 
Posts: 141
Default If workbook is open, save workbook?

try this

Private Sub Workbook_Open()
ActiveWindow.WindowState = xlMinimized
Application.DisplayAlerts = False
ActiveWorkbook.Save
Application.DisplayAlerts = True
End Sub

Best N10




"ph8" wrote in message
...

Greetings folks!

How do you check to see if a workbook is open?

And furthermore, if you do find one that is open, is there a way to
force that open workbook to save? Maybe by initializing a local
function or sub on the open workbook which just saves the sheet?

Also, what is the VBA code to open a workbook minimized?

Thanks in advanced for your time :).


--
ph8
------------------------------------------------------------------------
ph8's Profile:
http://www.excelforum.com/member.php...o&userid=19871
View this thread: http://www.excelforum.com/showthread...hreadid=518154