steve case
Well-known Member
- Joined
- Apr 10, 2002
- Messages
- 823
So far, i've gotten the following code:
SendKeys "%{tab}^a^c%{tab}"
to do my bidding and open another window, grab the contents and come back to Excel with it on the clipboard. It's a bit "clunky" for two reasons:
1. That code only seems to run by itself. if I put code before or after, it fails. If I try to call it up from another macro it fails )-:
2. I need to tell the users to make sure the target application is one [Alt-Tab] keystroke away.
I'm hoping someone here can help me with #2 above. Is there VBA code to activate a non-Excel window? For example, MyFile - Notepad or maybe XYZ-123 - InventoryControl or even MyPage - Microsoft Internet Explorer.
Any ideas on incorporating the Sendkey commands into more extensive codes would also be greatly appreciated.
It's pretty obvious what I'm trying to do here, so if I'm reinventing the wheel and Excel has as a "turn key" function, I really would like to know about it. (-:
.
.
.
.
SendKeys "%{tab}^a^c%{tab}"
to do my bidding and open another window, grab the contents and come back to Excel with it on the clipboard. It's a bit "clunky" for two reasons:
1. That code only seems to run by itself. if I put code before or after, it fails. If I try to call it up from another macro it fails )-:
2. I need to tell the users to make sure the target application is one [Alt-Tab] keystroke away.
I'm hoping someone here can help me with #2 above. Is there VBA code to activate a non-Excel window? For example, MyFile - Notepad or maybe XYZ-123 - InventoryControl or even MyPage - Microsoft Internet Explorer.
Any ideas on incorporating the Sendkey commands into more extensive codes would also be greatly appreciated.
It's pretty obvious what I'm trying to do here, so if I'm reinventing the wheel and Excel has as a "turn key" function, I really would like to know about it. (-:
.
.
.
.