Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Substitute for SendKeys?

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Substitute for SendKeys?

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



  #3   Report Post  
Posted to microsoft.public.excel.programming
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




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 320
Default Substitute for SendKeys?

Application.Goto
Yes, without supplying anything.
Bob Umlas
Excel MVP


"Gary''s Student" wrote:

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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Substitute for SendKeys?

Absolutely amazing !
Thank you !

I guess I am still a Student
--
Gary''s Student - gsnu200750


"Bob Umlas, Excel MVP" wrote:

Application.Goto
Yes, without supplying anything.
Bob Umlas
Excel MVP


"Gary''s Student" wrote:

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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Substitute for SendKeys?

Cute !

What about Forward ?

Regards,
Peter T

<Bob Umlas; "Excel MVP" wrote
in message ...
Application.Goto
Yes, without supplying anything.
Bob Umlas
Excel MVP


"Gary''s Student" wrote:

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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE.... max. limit 8 :( [email protected] Excel Discussion (Misc queries) 6 May 22nd 08 05:33 PM
Substitute mrbalaje Excel Discussion (Misc queries) 2 March 15th 07 07:47 AM
SUBSTITUTE Steved Excel Worksheet Functions 4 June 2nd 06 06:51 PM
Using &Chr$(39)& as substitute for ' in VBA Paul987 Excel Discussion (Misc queries) 4 March 15th 06 02:48 PM
Substitute chr(39) Jos Vens[_2_] Excel Programming 5 December 27th 04 09:11 AM


All times are GMT +1. The time now is 12:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"