• SendKeys question

    Author
    Topic
    #507661

    I have a few macros that use the SendKeys command to automatically say YES when a pop-up asks if a file should be overwritten. These macros have worked fine for years.

    I just put a new PC in place and all my macros are functioning correctly on the new install except that the SendKeys command is not working and I’m having to click YES to overwrite a saved file during an automatic SAVEAS command. Not a huge problem of course but I’d like to get it resolved.

    Is there some feature I’ve missed turning on in Excel in order for SendKeys to work in the marco? That’s the only thing I can think of that could be causing this change in the way the macro runs.

    Thanks,
    BH

    Viewing 0 reply threads
    Author
    Replies
    • #1585750

      Resolved. I just eliminated the SendKeys command and added Application.DisplayAlerts = False.
      Thanks,
      BH

      Application.DisplayAlerts = False
      ‘ SendKeys “{Y}”
      ActiveWorkbook.SaveAs Filename:=”D:MS OFFICE DOCUMENTSINVOICESPACK_SLIP.xls”, _
      FileFormat:=xlNormal, Password:=””, WriteResPassword:=””, _
      ReadOnlyRecommended:=False, CreateBackup:=False

    Viewing 0 reply threads
    Reply To: SendKeys question

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: