ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Disable Poups (https://www.excelbanter.com/excel-programming/433055-disable-poups.html)

Haarish

Disable Poups
 
Hi All,

I have a function which I am opening using the ShellExecute method to
Print. I have two issues in doing the same.

1. For password protected files, I am not able to catch the password
protected errors when I enter the wrong password. How do I catch the
error with the above statement?
2. After the file has been printed, since I am using Excel 2007 and
the source files are Excel 2003 - it prompts me asking if I want the
file to be saved. I do not want to save the file always.
Application.DisplayAlerts = False does not work. How do i disable the
save dialog?

Any ideas?

Thanks in advance,
Haarish.

Per Jessen[_2_]

Disable Poups
 
Hi,

2. Set the saved property True after the file has been printed.

ActiveWorkbook.Saved = True

Regards,
Per

On 31 Aug., 13:24, Haarish wrote:
Hi All,

I have a function which I am opening using the ShellExecute method to
Print. I have two issues in doing the same.

1. For password protected files, I am not able to catch the password
protected errors when I enter the wrong password. How do I catch the
error with the above statement?
2. After the file has been printed, since I am using Excel 2007 and
the source files are Excel 2003 - it prompts me asking if I want the
file to be saved. I do not want to save the file always.
Application.DisplayAlerts = False does not work. How do i disable the
save dialog?

Any ideas?

Thanks in advance,
Haarish.




All times are GMT +1. The time now is 10:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com