Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default After SaveAs Event

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 320
Default After SaveAs Event

you want the Workbook_beforesave event

"ZipCurs" wrote in message
...
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.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 489
Default After SaveAs Event

Put it in this event.

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

End Sub

Hope this helps! If so, let me know, click "YES" below.
--
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.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 489
Default After SaveAs Event

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.

  #5   Report Post  
Posted to microsoft.public.excel.programming
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.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default After SaveAs Event

Bob,

Thank you for replying. Please see my response to Ryan H.

"Bob Umlas" wrote:

you want the Workbook_beforesave event

"ZipCurs" wrote in message
...
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.


.

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 489
Default After SaveAs Event

This is a stretch but it might work. Read the help section on DoEvents.
Maybe your operating system has a lot going on and you need to let it finish
before VBA continues or maybe a weak video card. I'm just guessing. Hope it
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
DoEvents
' your save code here

' the rest of your code here
DoEvents
Application.ScreenUpdating = True

End Sub

--
Cheers,
Ryan


"ZipCurs" wrote:

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.

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default After SaveAs Event

Ryan,

You have answered my question, although I don't plan to act on it. I will
live with a little cosmetic garbage after SaveAs. The primary issue is "your
save code here". I am not really excited about getting into having the right
version.

Thanks

"Ryan H" wrote:

This is a stretch but it might work. Read the help section on DoEvents.
Maybe your operating system has a lot going on and you need to let it finish
before VBA continues or maybe a weak video card. I'm just guessing. Hope it
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
DoEvents
' your save code here

' the rest of your code here
DoEvents
Application.ScreenUpdating = True

End Sub

--
Cheers,
Ryan


"ZipCurs" wrote:

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.

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default After SaveAs Event

Try disabling the alerts...as below

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

Application.ScreenUpdating = False
Application.DisplayAlerts = False

' your code here

Application.ScreenUpdating = True
Application.DisplayAlerts = True

End Sub


--
Jacob


"ZipCurs" wrote:

Ryan,

You have answered my question, although I don't plan to act on it. I will
live with a little cosmetic garbage after SaveAs. The primary issue is "your
save code here". I am not really excited about getting into having the right
version.

Thanks

"Ryan H" wrote:

This is a stretch but it might work. Read the help section on DoEvents.
Maybe your operating system has a lot going on and you need to let it finish
before VBA continues or maybe a weak video card. I'm just guessing. Hope it
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
DoEvents
' your save code here

' the rest of your code here
DoEvents
Application.ScreenUpdating = True

End Sub

--
Cheers,
Ryan


"ZipCurs" wrote:

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.

  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default After SaveAs Event

Hello Jacob,

Thanks for your input. Your recommendation would work if I were willing to
insert SaveAs code in the "your code here" area, and Cancelling the manual
action. I have tried this and I don't want to deal with getting the versions
right, dealing with repeat names, etc. All I want to do is a simple action
after the SaveAs. Any thoughts would be welcome, but I think that I am done.

"Jacob Skaria" wrote:

Try disabling the alerts...as below

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

Application.ScreenUpdating = False
Application.DisplayAlerts = False

' your code here

Application.ScreenUpdating = True
Application.DisplayAlerts = True

End Sub


--
Jacob


"ZipCurs" wrote:

Ryan,

You have answered my question, although I don't plan to act on it. I will
live with a little cosmetic garbage after SaveAs. The primary issue is "your
save code here". I am not really excited about getting into having the right
version.

Thanks

"Ryan H" wrote:

This is a stretch but it might work. Read the help section on DoEvents.
Maybe your operating system has a lot going on and you need to let it finish
before VBA continues or maybe a weak video card. I'm just guessing. Hope it
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
DoEvents
' your save code here

' the rest of your code here
DoEvents
Application.ScreenUpdating = True

End Sub

--
Cheers,
Ryan


"ZipCurs" wrote:

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.

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
saveas ActiveWorkbook.SaveAs Filename:=Range("A1").Value DarrenL Excel Programming 4 April 18th 09 07:54 AM
thisworkbook.saveAs triggers change event? Alerion Excel Programming 3 April 6th 07 07:46 AM
SaveAs closing file without firing event WorkBook_beforeclose PFS Excel Programming 1 November 2nd 06 10:49 PM
BeforeSave event fired but not working when triggered by SaveAs. Anders Excel Programming 3 October 6th 06 04:58 PM
VBA capture File SaveAs Event Linda Mcfarlane Excel Programming 2 September 17th 03 04:06 AM


All times are GMT +1. The time now is 04:11 PM.

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"