AppActivate and Excel 2010

DavidDinIN

New Member
Joined
Aug 12, 2009
Messages
2
We recently upgraded from Excel 2003 to 2010. I have a VBA script which sends information to a non-windows-friendly terminal program by using AppActivate and Sendkeys. Since it would have to switch focus back to Excel for msgboxes and inputboxes at times, I did this:

Dim Myself as string
Myself = activewindow.caption

Then AppActivate(Myself) would take focus back to the original spreadsheet.

After the "upgrade", however, the AppActivate line started giving me errors, and I finally figured out that if I only had a single open spreadsheet, the title in the Windows Task Bar was just "Microsoft Excel".

I made a temporary fix by changing to

Myself = "Microsoft Excel - " & activewindow.caption

but I'm sure there's a better solution.

Any ideas?
 

Some videos you may like

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Watch MrExcel Video

Forum statistics

Threads
1,109,175
Messages
5,527,243
Members
409,754
Latest member
ekTZ

This Week's Hot Topics

Top