RawlinsCross
Active Member
- Joined
- Sep 9, 2016
- Messages
- 437
Having a bit of trouble with this one. When I load the application and manually hit 'Alt' + "Y3" + 'Alt' it works perfectly. It seems it doesn't like it when I place the code in the Workbook_Open sub-routine.
It gives me an odd error saying "The cell or chart you're trying to change is on a protected sheet. To make a change, unprotected the sheet. You might be requested to enter a password"
Very odd, I can do it manually but not programmatically. Any thoughts?
VBA Code:
Private Sub Workbook_Open()
Application.SendKeys "%Y3%" 'Alt + Y3 + Alt key
End Sub
It gives me an odd error saying "The cell or chart you're trying to change is on a protected sheet. To make a change, unprotected the sheet. You might be requested to enter a password"
Very odd, I can do it manually but not programmatically. Any thoughts?