Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Focus is on wrong sheet after opening.
"Roger Govier" wrote in message
... Hi You could prevent the flicker with Private Sub Workbook_Open() Application.ScreenUpdating = False Sheets("the sheet to view on opening here").select Application.ScreenUpdating = True end sub [snip] After applying the above to the workbook, I still had that awful flicker. Then it occurred to me (d'uh) to look at the rest of the code. I'm no vb expert of course but I've created so many XL2K workbooks now with floating toolbars that I'm more or less familiar with what elements should be there. In the This Workbook module (correct word?), I had a count sheets code in. I can't remember which workbook needed this but one did. Removed all that extra stuff and the flickering stopped on its own. Crazy, huh? But I managed to figure this out on my own, so I'm feeling pretty smug <lol. Nevertheless, all this code is going into my Tips folder. It'll come in handy at some point, I know. Thanks once again for everyone's help. Much appreciated. :oD |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Focus is on wrong sheet after opening.
Hi
Thanks for the feedback letting us know how you got on. Well done for figuring out the cause of the problem, and solving it yourself. -- Regards Roger Govier "StargateFanFromWork" wrote in message ... "Roger Govier" wrote in message ... Hi You could prevent the flicker with Private Sub Workbook_Open() Application.ScreenUpdating = False Sheets("the sheet to view on opening here").select Application.ScreenUpdating = True end sub [snip] After applying the above to the workbook, I still had that awful flicker. Then it occurred to me (d'uh) to look at the rest of the code. I'm no vb expert of course but I've created so many XL2K workbooks now with floating toolbars that I'm more or less familiar with what elements should be there. In the This Workbook module (correct word?), I had a count sheets code in. I can't remember which workbook needed this but one did. Removed all that extra stuff and the flickering stopped on its own. Crazy, huh? But I managed to figure this out on my own, so I'm feeling pretty smug <lol. Nevertheless, all this code is going into my Tips folder. It'll come in handy at some point, I know. Thanks once again for everyone's help. Much appreciated. :oD |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Focus is on wrong sheet after opening.
"StargateFanFromWork" wrote in message
... "Roger Govier" wrote in message ... Hi Thanks for the feedback letting us know how you got on. Well done for figuring out the cause of the problem, and solving it yourself. <wry grin Turns out I'm still not so smart, though <sigh. [snip] Yet it's a toss-up. Do I leave the filtering and have an open, corruptible environment ... or do I remove the filtering, leave all the unprotect/protect codes in places before and after sorts but the user can't filter at any of the columns at all. Tough, tough choice. [snip] Had to pass along conclusions in case anyone else finds themselves in a similar situation. I'm going to leave the ability to manually filter off. I've again removed all the filtering code that caused the flickers in the sheet upon opening. This was after trying the workbook again just now and finding that even though the manual filters don't work at all, the ones in the printing buttons do. They allow the sheet to be printed out 3 different ways, one with all the entries, one with in-house training and another with training done via outside sources. That's good enough, I believe, since with fiscal year end there isn't much more I can do not having all the knowledge needed to make such a complex thing work from all angles. If they need anything more than that, I'll leave it to them to figure it out. I will be paying attention to any posts in the archives again re filtering protected sheets to see if I can learn anything more soon but in the meantime at least we have the ability for those 3 reports above and that's good. Since those are possible to do, it's more important now to leave the protection codes** in place to keep the book from being easily messed up. (** I mean by that these 2 codes put at beginning and end of each various commandbar macros to enable sorting, etc.: ActiveSheet.Unprotect 'place at the beginning of the code ActiveSheet.Protect ' place at end of code) Thanks. All this helped. One learns so much this way even though it is a tad frustrating. :oD |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Focus is on wrong sheet after opening.
On Tue, 27 Mar 2007 10:39:45 +0100, "Roger Govier"
wrote: Hi You need to stop screen updating at the start of the sub, then switch back on at the end. Did I put it in the anti-screene updating in the wrong place <lol Private Sub Workbook_Open() Dim I As Integer Application.ScreenUpdating = False For I = 1 To ThisWorkbook.Worksheets.Count Worksheets(I).Activate ActiveSheet.EnableAutoFilter = True ActiveSheet.Protect UserInterfaceOnly:=True Next I Sheets("LAR Stats").Select Application.ScreenUpdating = True End Sub Thanks. :oD |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
On opening a worksheet move focus to a cell based on date | Excel Worksheet Functions | |||
Focus is on wrong sheet after opening. | Excel Programming | |||
HELP!! Unhide Sheet with Macro and focus on other sheet | Excel Discussion (Misc queries) | |||
Code Repeats Itself And Goes To Wrong Focus | Excel Programming | |||
Wrong Macro opening | Excel Programming |