Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shift focus from a userform to excel

Status
Not open for further replies.

ByDesign

Electrical
Joined
Jun 3, 2003
Messages
17
Location
US
Hello

How can I shift focus from a visible userform to the excel sheet?

Currently, the last statement in my procedure is...
Sheets("MySheet").Range("B93").Activate

The cell selector is put in the correct place, however the userform still has focus... therefore you must actually click the excel sheet before you can type in the selected cell.

Any ideas on how to programatically shift focus to the excel sheet?

Thanks for the help!

Have a great day!

Scott
 
When you hide the userform, XL will have the focus. In most applications, the user will dismiss the form and then continue working on the worksheet.

Cheers,
Joerd

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
 
Joerd

On another board I also found... AppActivate ("Microsoft Excel")

This keeps the userform visible and sets focus to the named app

Thanks for the input.

Have a great day!

Scott
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top