Hi everybody,
sorry for not answering sooner.
The code works.
I had the same problem as you --> it's because you must not start the code in the editor but from Excel or that like. If you start the code from the editor, 'AppActivate' activates the Window for one second and jumps back to the editor in order to execute the next line. If you start the code from somewhere else (not in the editor) you won't have such issues
I've improved the code a little bit: (not the codes waits until the window "SaveAs" (Speichern Unter) is opened
Set WshShell = CreateObject("WScript.Shell")
Do
On Error Resume Next
AppActivate "SaveAs"
Loop Until Err.Number = 0
AppActivate "Speichern unter"
WshShell.SendKeys "%n"
WshShell.SendKeys strFilename
WshShell.SendKeys "%s"
I look for a code sending the parts without activating the window (i.e. in the background) but that takes a while
thanks
br
Michael