Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Show userform without it taking focus?

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Show userform without it taking focus?

That worked! Thanks so much.

Leah

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Focus on Control before UserForm(s) pop up Bob Phillips[_6_] Excel Programming 0 May 5th 04 04:03 PM
Taking focus off a Control Checkbox Don Wiss Excel Programming 1 November 11th 03 12:18 AM
UserForm Loss Focus Orlando Magalhães Filho Excel Programming 2 September 5th 03 04:47 AM
Must be a way to force focus back to sheet instead of UserForm - isn't there? Les[_4_] Excel Programming 2 July 29th 03 12:45 PM
Simulating the Format Painter, Selection.Select, and taking focus David McRitchie[_2_] Excel Programming 3 July 10th 03 03:48 AM


All times are GMT +1. The time now is 11:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"