Sendkeys Taboo Question

Jaye7

Well-known Member
Joined
Jul 7, 2010
Messages
1,069
I know that sendkeys are very taboo, many are for it and many are against it.

Anyway, I want to use them and therefore this question, does anyone have a sendkeys script that can select a specific tab in Internet Explorer, i.e. I have 10 tabs open and I want to select tab 2.

Also a sendkeys script to select an input box on the tab.

Thanks
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Hi,
send keys is a funny thing, you would need to use the windows shortcuts (tab + ctrl) to change the tab, but can not specify which one.
 
Upvote 0
Jaye

I don't think I've ever seen anyone 'pro' SendKeys.

Sometimes they are used as a last resort though.

In your case they might not be needed, perhaps you can explain further what you are doing.
 
Upvote 0
sendkeys is soooo unreliable and very fickle (it uses the active screen to send keys to, sometimes wont send or wait for the application to load etc)

usually there is better ways of doing things things thou. as above a more detailed explanation will help us more to help you :)
 
Upvote 0
I found the solution to selecting the tab that I want.

Code:
SendKeys ("^{1}") ' change 1 to 2 etc...

I don't really need the input box script now as this solves my problem.

Sendkeys works fine for this as I activate Internet Explorer before using the script.

Thanks for replying anyway.
 
Upvote 0

Forum statistics

Threads
1,223,942
Messages
6,175,544
Members
452,652
Latest member
eduedu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top