How to suppress messages?

  • Thread starter Thread starter Jan Nademlejnsky
  • Start date Start date
J

Jan Nademlejnsky

1. My macro saves spreadsheet sometimes over the existing spreadsheet. How to suppress message "The file already exists. Do you want to ...." and save it regardless if it exists or not?

also,

2. I use these statements:
Range("F2").Select

Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True

This opens Spreadsheet, which is password protected. Is it possible to hard code the password so the process continues without waiting for the password to be entered.

BTW I know that I can use this:

Workbooks.Open FileName:=ThisWorkbook.Path & "\HT.xls", UpdateLinks:=0, ReadOnly:=False, WriteResPassword:="surveys"

but it does not work with my sheet which is collecting life data from various instruments (pressure, volume, temperature..), called "Uniformance."

I would appreciate your help.

Jan
 
Hi
For the first question: use the following lines at the beginning and at
the end
Application.displayalerts = false
and
Application.displayalerts = True
 
Frank,
Exactly, what I was looking for. Thank you very much. Hopefully, somebody
will help me with the second question.
Thanks
Jan
 
Back
Top