a.phillips
Registered User.
- Local time
- Today, 12:35
- Joined
- Jul 19, 2011
- Messages
- 37
Hi, I am using send keys to password protect an excel document.
Here is the code once the spreadsheet is open:
With oXL
.Visible = True
.Workbooks.Open (sFullPath)
SendKeys "(%F)(a)(%l)"
SendKeys "g"
SendKeys "password"
SendKeys "{ENTER}"
SendKeys "password"
SendKeys "{ENTER}"
This is where it stops working
SendKeys "{ENTER}"
SendKeys "y"
' .Workbooks.Close (sFullPath)
End With
I just need it to hit enter and y to save it and over-right the current file.
Anyone know why it stops working here, does it need a pause?
Thanks
Here is the code once the spreadsheet is open:
With oXL
.Visible = True
.Workbooks.Open (sFullPath)
SendKeys "(%F)(a)(%l)"
SendKeys "g"
SendKeys "password"
SendKeys "{ENTER}"
SendKeys "password"
SendKeys "{ENTER}"
This is where it stops working
SendKeys "{ENTER}"
SendKeys "y"
' .Workbooks.Close (sFullPath)
End With
I just need it to hit enter and y to save it and over-right the current file.
Anyone know why it stops working here, does it need a pause?
Thanks