Trevor
03-17-2008, 12:57 PM
I'm using sendkeys after creating a report to autosave it to the desktop
(in .xls, excel), but can't seem to open it and sendkeys to autoformate it ( reason is time for file to open seems to very)
the file name changes( and is in the form used to create the report Forms![Report selector]![reportname]
Is there a way to wait until the file is opened before sendingkey?
I have tried
Dim wait as double
Timer = wait
while wait < 3 ' time in seconds
Doevents ' does nothing
Wend
Sendkeys "%o" ' which if the file opened intime should sendkeys alt + O to excel to autoformat, but doesn't, even Sendkeys "%0", wait won't work because it only waits until the key(s) are sent before issuing the next command or set of keys
End Sub
(in .xls, excel), but can't seem to open it and sendkeys to autoformate it ( reason is time for file to open seems to very)
the file name changes( and is in the form used to create the report Forms![Report selector]![reportname]
Is there a way to wait until the file is opened before sendingkey?
I have tried
Dim wait as double
Timer = wait
while wait < 3 ' time in seconds
Doevents ' does nothing
Wend
Sendkeys "%o" ' which if the file opened intime should sendkeys alt + O to excel to autoformat, but doesn't, even Sendkeys "%0", wait won't work because it only waits until the key(s) are sent before issuing the next command or set of keys
End Sub