Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
As subject - have tried ActiveCell.Activate and all sorts of other things in all sorts of event procedures and nothing seems to work. Is there a single line of code that will force the focus back to the sheet from which the UserForm was 'shown' (via a button click)? I just want to click on the button and have the focus returned back to the cell that was active at the time of the UserForm opening. Have also tried making ALL controls on the UserForm have no TabStop, or no TakeFocusOnClick - all to no avail - I'm at the absolute end of my tether with regard to what else to try. I must be missing something. regards, -- Les Hay, Livingston. Scotland |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Chip
Thanks, solved all of the problems I was having. Now to try and figure out what that line actually does - hope the kelp files are up to it :-) regards, -- Les Hay, Livingston. Scotland "Chip Pearson" wrote in message ... Les, Try something like the following: UserForm1.Show vbModeless AppActivate Application.Caption -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Les" wrote in message ... Hi As subject - have tried ActiveCell.Activate and all sorts of other things in all sorts of event procedures and nothing seems to work. Is there a single line of code that will force the focus back to the sheet from which the UserForm was 'shown' (via a button click)? I just want to click on the button and have the focus returned back to the cell that was active at the time of the UserForm opening. Have also tried making ALL controls on the UserForm have no TabStop, or no TakeFocusOnClick - all to no avail - I'm at the absolute end of my tether with regard to what else to try. I must be missing something. regards, -- Les Hay, Livingston. Scotland |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
ADDING/DELETING SHEET Without losing focus? | Excel Discussion (Misc queries) | |||
HELP!! Unhide Sheet with Macro and focus on other sheet | Excel Discussion (Misc queries) | |||
How do I get focus back on an Excel file? | Charts and Charting in Excel | |||
How to set focus back to sheet after showing a user form | Excel Programming | |||
How to set focus back to sheet after showing a user form | Excel Programming |