View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Substitute for SendKeys?

Thank you!
--
Gary''s Student - gsnu200750


"Peter T" wrote:

Hmm, the references must be stored somewhere but try this workaround -

Sub test()
Dim c As CommandBarButton

Set c = CommandBars.FindControl(ID:=1017) ' Back
On Error Resume Next
c.Execute
If Err.Number Then
Set c = CommandBars.FindControl(ID:=1018) ' Forward
c.Execute
End If

End Sub

Regards,
Peter T



"Gary''s Student" wrote in message
...
If I click on a hyperlink in a worksheet that sends me to another location

in
the workbook, I can return with ALT-BACKARROW. In VBA, I can return with:

Application.SendKeys "%{LEFT}"

Can I do the same thing without SendKeys?
--
Gary''s Student - gsnu200750