Macro messages

GraemeG

Registered User.
Local time
Today, 06:50
Joined
Jan 22, 2011
Messages
212
Hello

I have a macro which runs about 8 queries.
But when I run the macro messages appear regaring what the query is about to do etc and requires a repsonse. Can I remove these so the macro just runs and then states finished?

Any help much appreciated.

Thanks
 
Click on Show all actions Icon
Find SetWarnings in the lsit of actions
SetWarnings False before all your actions
Remember to set back to SetWarnings True after all query actions
 
Resolved - It was 'setwarnings' no
Please change thread to resolved admin
 
I am trying to use your advice to Suppress Messages while exporting to Excel. I cannot find the 'SetWarnings' command anywhere in the Macro screen. Where is it?
Using Access10, Windows 7.

Thank you.

Jim
 
I found the SetWarnings command and set it to 'No'. I still get several "The file already exist, Do you want to replace it? Yes or No" Messages.

Does the SetWarning command not suppress these messages.

My macro exports 6 Forms to Excel and I want it to overwrite the existing file with the new updated data.

If this is not the right method for this, how would I accomplish the results?

Thank you.

PS The link was informative. I found the command.

Jim
 
Howzit

Sorry I'm not entirely sure. I know that from with in excel it is something like Application.displayalerts = false

Try testing to see if the file exists first, and if so kill it.

Something like

Code:
If Dir(strPath) <> "" Then
    Kill (strPath) 'Delete (strPath)
Else
    'your other code
End If
 

Users who are viewing this thread

Back
Top Bottom