View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
ZipCurs ZipCurs is offline
external usenet poster
 
Posts: 103
Default After SaveAs Event

Bob & Ryan,

I tried this before and I tried it again. It does not work. I even put a
"stop" in it to ensure that it is accessed, and it is. The problem is that
the garbage shows up after the BeforeSave. I even tried it with
ScreenUpdating left False.

I could imagine doing an automatic SaveAs in BeforeSave and then cancelling
the manual one but these seems a bit hardcore. Any other thoughts?

"Ryan H" wrote:

Use this event. Hope this helps! If so, let me know, click "YES" below.


Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)

Application.ScreenUpdating = False

' your code here

Application.ScreenUpdating = True

End Sub

--
Cheers,
Ryan


"ZipCurs" wrote:

Hello,

I have a VBA application that appears to work fine. My only known issue is
that when I perform a manual Save As, I get a bunch of garbage on the active
window. I have had this problem and the exact same garbage when running
individual routines in the application, and have gotten rid of them with
Application.ScreenUpdating=False. Minimally, my problem is that I have no
clue where to put this after a manual SaveAs.

In ThisWorkbook, I use Workbook_Open, Workbook_Deactivate,
Workbook_Activate, and Workbook_SheetActivate. None of these appear to run
during Save As operations.

Thank you for you help in advance.