View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Show userform without it taking focus?

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

worked for me.

--
Regards,
Tom Ogilvy


"leah" wrote in message
m...
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