79431200

Date: 2025-02-11 20:08:43
Score: 4.5
Natty: 4
Report link

I had this problem too, did you manage to find out more details about it?

Public Sub save_book()
    ' fasctinating.. cannot use .protect methods when
    ' using thisworkbook.save
    Application.SendKeys "^s", True
    DoEvents
End Sub

The above code will press keyboard short-cut CTRL+S. DoEvents allows the operating system to recognise the save before moving to the next part of your VBA code.

Not sure if excel allows you to change keyboard short-cuts though!

Reasons:
  • RegEx Blacklisted phrase (3): did you manage to find out
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Nathan Bachetti