trying to get rid of read only confirmation message


Posted by Susan on November 01, 2001 2:19 PM

when i open file as read only i get a confirmation message "soandso.xls has been open as a read only file." the message has only "OK" button and is totally useless. is there a way to make it not apprear? also is there a line in VBA to do it? thanks!



Posted by Joe Was on November 02, 2001 5:05 AM

Add:

Application.DisplayAlerts=False
{your code}
Application.DisplayAlerts=True

This stops Excel alerts fron running.

You should also use:
Application.ScreenUpdating=False, rep for True to turn it back on at the end of your code.
ScreenUpdating forces Excel to do your work in memory rather than in the graphics card so your code will run faster. JSW