Home |
Search |
Today's Posts |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
listbox will not refresh
JSnander I have cleaned upyour code by combining several instructions into one instruction I don't play around much with list boxes so I am not sure what your problem is exactly but I have included a command of repaint which refreshes a userform on screen Is this sub on a userform? Sub PickAFarmer() 'Application.ScreenUpdating = False MyData = Sheets("Main").Range("c2").Text ' combobox populates c2 Sheets("Main").Columns("aa:cz").ClearContents Sheets("Recipes").Activate cell.Sort Key1:=Range("A2"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom Range("A1").Activate Do While ActiveCell.Text < MyData ActiveCell.Offset(1, 0).Activate Loop Set first = ActiveCell Do While ActiveCell.Text = MyData ActiveCell.Offset(1, 0).Select Loop ActiveCell.Offset(-1, 60).Select Set last = ActiveCell Range(first, last).Copy Sheets("Main").Select Range("aa2").Paste Range("AB2").Copy Range("G2").Paste Range("G2").Select Application.ScreenUpdating = True Repaint End Sub ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ ~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
listbox B conditional of input in Listbox A | Excel Discussion (Misc queries) | |||
listbox.value not equal to listbox.list(listbox.listindex,0) | Excel Programming | |||
Is refreshing listbox rowsource in listbox click event possible? | Excel Programming | |||
Pivot Table REFRESH Flaw -- Saves Old Data in Selection Area AFTER REFRESH | Excel Programming | |||
Sorting ListBox results or transposing ListBox values to other cells for sorting | Excel Programming |