Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Group,
I have a form button on a worksheet(The Best Team), which when clicked, runs VBA code (provided below) to run a Solver routine. Is there any way that I can turn off all the screen updates so that when I click the button all I get its the returned results of the Solver routine without viewing it all happen on screen? Many thanks Tony 'Code Sub FindtheBestTeam() Application.ScreenUpdating = False Sheets("Data").Visible = True 'Unhide Data worksheet Sheets("Data").Select Range("K6").Select 'Start of Solver Routine SolverOk SetCell:="$O$6", MaxMinVal:=1, ValueOf:="0", ByChange:="$K$6:$K$203" SolverSolve UserFinish:=True 'Do not show any dialog boxes ' End of Solver Routine Range("K5").Select Selection.AutoFilter Range("K5").Select Selection.AutoFilter Field:=6, Criteria1:="1" 'Copy the filtered results using excellent generic code 'provided by Tom Oglivy Call CopyFilter 'Switch off autofilter Sheets("Data").Select Range("K5").Select Selection.AutoFilter Field:=1 Range("K5").Select Selection.AutoFilter Range("F6").Select Sheets("The Best Team").Select Range("F18").Select 'Hide the Data sheet Sheets("Data").Visible = False 'View the Best Team Sheets("The Best Team").Select Application.ScreenUpdating = True End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
CAE macro for green screen updates with Excel data | Excel Discussion (Misc queries) | |||
Writing a macro that updates solver solutions? | Excel Worksheet Functions | |||
Interesting Solver problem (Solver encounters an error) | Excel Discussion (Misc queries) | |||
Solver VBA routine | Excel Discussion (Misc queries) | |||
macros and screen updates | Excel Programming |