Loading Specific Sub-Menu without HotKey
Started by DocCruncher


Rate this topic
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5


6 posts in this topic
DocCruncher
Member
***


0
115 posts 21 threads Joined: Oct 2009
05-09-2012, 07:59 AM -
#1
I need to load a specific TLB menu, called Modules, with an Excel HyperLink so I can return to the same TLB menu that I loaded the Excel worksheet from so I can load another Excel file.

Putting "C:\Users\<your account>\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch" simply takes me to the Quick Launch folder in my file manager.

I know I can open the TLB main Menu with a HotKey but I want to open a TLB sub-menu which I can't find a HotKey command for. Anyway, I don't want to use a HotKey but prefer a text string instead.

What file actually opens TLB?
What does the string to open my main TLB START & Modules sub-menu look like?

Thanks;
Doc
This post was last modified: 05-09-2012, 08:00 AM by DocCruncher.
Yuri Kobets
Posting Freak
*****


10
6,208 posts 429 threads Joined: Jan 2002
05-12-2012, 10:16 AM -
#2
I'm sorry. TLB don't actually opens any file, when you open the menu. And currently there are no any way to open menu from external applications.
The TORDEX Team
http://www.tordex.com
DocCruncher
Member
***


0
115 posts 21 threads Joined: Oct 2009
05-12-2012, 11:07 AM -
#3
Hi Yuri;

I came to the same conclusion as you mentioned so i gave up trying to call TLB directly.

I found a work-a-round way to do it by creating a separate Modules TLB menu screen (SEE: JPEG) & assigning a HotKey to it. I than made a AutoHotKey exe file that contains the TLB HotKey. When I want to exit the Excel file & return to Modules TLB menu, I call the AHK exe file with a VBA script assigned to the title line (usually row one) simply by clicking anywhere on the title line (Inventory). It works very well.

The VBA script is a simply one liner...

Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
If Target.Range.Row = 1 Then Shell ("D:\Configs and Settings\AutoHotKey\Scripts\Load TLB Modules Menu.exe")
End Sub

The AHK script is also a simple one liner...

Send ^!+K

Where
^ = Ctrl
! = Alt
+ = Shift
K = the final key of the HotKey to send.

So I can now load all my important documents with TLB & return to TLB simply by clicking on the title line of the document.

Cheers;
Doc



Attached Files Thumbnail(s)
       
Yuri Kobets
Posting Freak
*****


10
6,208 posts 429 threads Joined: Jan 2002
05-12-2012, 11:38 AM -
#4
BTW. You can make the same things with VB only:
Code:
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
    If Target.Range.Row = 1 Then SendKeys("+^%K")
End Sub
The TORDEX Team
http://www.tordex.com
DocCruncher
Member
***


0
115 posts 21 threads Joined: Oct 2009
05-12-2012, 11:54 AM -
#5
(05-12-2012, 11:38 AM)Yuri Kobets Wrote: BTW. You can make the same things with VB only:
Code:
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
    If Target.Range.Row = 1 Then SendKeys("+^%K")
End Sub
I would LOVE to do it with SendKeys only but have never been able to get SendKeys working on my computer. SendKeys was the very first thing that i tried but was unsuccessful.

I have no idea why SendKeys does not work on my Win 7x64 computer. Any ideas would be MUCH appreciated.

Cheers;
Doc
Yuri Kobets
Posting Freak
*****


10
6,208 posts 429 threads Joined: Jan 2002
05-13-2012, 06:21 PM -
#6
Sorry, I have no ideas about this problem. I've tested the SendKeys on Win7 x64 and Office 2010. It is working here.
The TORDEX Team
http://www.tordex.com
DocCruncher
Member
***


0
115 posts 21 threads Joined: Oct 2009
05-15-2012, 01:22 PM -
#7
I’ve been doing a lot of Googling on SendKeys & it seems that there IS a major problem with SendKeys on both Vista & Win 7 (I assume on Win 8 also). Many developers & programmers advise to stay completely away from SendKeys as the last version of Windows that they worked reliably on was Win XP. With the event of Vista SendKeys started to act weird and often unreliably with the following problems being documented…
1. Sendkeys can transmit different code depending on which windows were open or how many were open. This is exactly my experience.
2. The code that SendKeys sends may be completely different from what you programmed it to send. In my case the code string we have been discussing actually opened up the Start Task Manager window… NOT what I asked for.

One developer bluntly said “Don’t use SendKeys for ANYTHING”. Other programmers made similar statements.

The weird thing is that on some systems (such as yours) SendKeys seems to work correctly (also documented) while on others it is a complete bag of worms. No one really knows why this is but I suspect it has to do with the combination of hardware & software one is running.

The problem is so bad on many systems that a third party has developed a complete replacement for SendKeys called SenKey (no S on the end). You install SenKey.bas with your project and SendKey.bas captures all your SendKeys commands & transmits them correctly. SendKey has two problems… they want $30 US for SendKey.bas which is more than I am willing to pay just to transmit a couple of HotKey strokes plus just like SendKeys, it does not support the Win key which I need for one of my keystroke transmissions.

So, the bottom line is… I use AutoHotKey to do all that I want plus it provides a wealth of other features that SendKeys never provided.

Hope this helps a little to clear up the confusion as to why SendKeys work sometime or on some systems & not on others like mine.

Cheers;
Doc


Forum Jump:


Users browsing this thread: 1 Guest(s)