SubApplication.SendKeys command is opening the Start Menu

borgem

Board Regular
Joined
Oct 22, 2009
Messages
187
The macro is as follows:

Code:
Sub FindText()

CommandBars("Edit").Controls("Find...").Execute
Application.SendKeys "%(h)W%(t)%(h)W%(n){DEL}{ESC}"


End Sub

It only seems to open the Start Menu when I use an assigned hotkey to call the macro. I had originally set it as ctrl+shift+f ("ctrl+F") and have tried changing it to other hotkeys with the same result. It is currently ctrl+t and I produce the same result. I have just recently received a new computer at work that has Windows 7/Office 7 where I was running XP/Office 2003 previously with the same macro without a hitch.
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
To elaborate, the string after the send keys changes the "find" options to look at the entire workbook and clears any previous query values.
 
Upvote 0
Solved! Because Ctrl+Esc calls the start menu and I was holding ctrl in order to call the macro via hotkey, I just used {TAB}+{TAB} to replace the {ESC}
 
Upvote 0

Forum statistics

Threads
1,215,548
Messages
6,125,472
Members
449,231
Latest member
Sham Yousaf

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