Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Excel losing focus and non-updating userforms

Hello All,

I've a number of Excel VBA applications which require user input/
response, and I've got 2 commonly occurring issues, relating to what
maybe the same thing

(1) Dropdown comboxbox on a userform -
The user must select an item from a combobox, then the user then must
select another item from combobox (containing 10 items at least). My
problem, is that when the second combobox appears you can still see
the previous dropdown list (in its expanded form) on the screen.
Despite a combination of 'Unload' and screen updates, the original
dropdown list stays visible.
I'm pretty sure Im missing something stupidly obvious here.

(2) When msgbox appears, Excel loses focuses
When a msgbox appears, typically at the end of the program, when I
display something that indicates the end of the program, Excel loses
focus. That's to say, another program takes focus, and the Excel icon
on the application bar starts to flash, suggesting that Excel wants
you to click okay on the msgbox.
This seems to occur more on some users than others.

Any suggestions would be very helpful.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Excel losing focus and non-updating userforms

for the first, do you have screenupdating set to false?

Perhaps you answered that with this statement:
Despite a combination of 'Unload' and screen updates,


But that is the usual cause

In addition, you might be showing a second userform from the first. Once
you do

Userform2.Show from a click event in the first userform, no more code
will run in the first useform until the second userform is unloaded or
hidden.

YOu might use

Private Sub combobox1_Click()
me.Hide
doevents
userform2.show
' if the first userform is done then perhaps
unload me
End Sub

--
Regards,
Tom Ogilvy


"mo_in_france" wrote:

Hello All,

I've a number of Excel VBA applications which require user input/
response, and I've got 2 commonly occurring issues, relating to what
maybe the same thing

(1) Dropdown comboxbox on a userform -
The user must select an item from a combobox, then the user then must
select another item from combobox (containing 10 items at least). My
problem, is that when the second combobox appears you can still see
the previous dropdown list (in its expanded form) on the screen.
Despite a combination of 'Unload' and screen updates, the original
dropdown list stays visible.
I'm pretty sure Im missing something stupidly obvious here.

(2) When msgbox appears, Excel loses focuses
When a msgbox appears, typically at the end of the program, when I
display something that indicates the end of the program, Excel loses
focus. That's to say, another program takes focus, and the Excel icon
on the application bar starts to flash, suggesting that Excel wants
you to click okay on the msgbox.
This seems to occur more on some users than others.

Any suggestions would be very helpful.


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
ADDING/DELETING SHEET Without losing focus? Faraz A. Qureshi Excel Discussion (Misc queries) 1 July 29th 09 12:55 PM
Excel losing focus, but remains active ! Nandan Excel Programming 1 April 27th 07 02:32 PM
Updating Cells w/ Userforms AndrewAK[_2_] Excel Programming 0 October 21st 04 03:24 PM
Set Focus on Control at Creation in Dialogs, I mean UserForms GJones Excel Programming 0 May 4th 04 02:15 PM


All times are GMT +1. The time now is 07:55 AM.

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"