Show userform without it taking focus?

L

leah

I'm using a modeless userform to display a running set of totals on my
spreadsheet. When I first bring it up using interface.Show, the
userform takes focus, and users think that the spreadsheet has been
locked. Really the cursor has just shifted to the userform, but it's
very annoying. Does anyone know of a way programmatically to shift the
focus back to the underlying spreadsheet? I've tried activating the
sheet and selecting cells using VBA, but none of it returns the focus
to the spreadsheet.

TIA!
Leah
 
T

Tom Ogilvy

Sub ShowForm()
UserForm1.Show 0
AppActivate Application.Caption
End Sub

worked for me.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top