![]() |
Need to make progress indicator more efficient
ok, a little long here, hang with me...
I have a sheet with a column of names, say process 1, process 2, etc, about 20 total. Next to these names I have a cell that says incomplete (red) or complete (green). Elsewhere I have a userform with a listbox in it populated with the same 20 names. CURRENTLY: When someone clicks on a name in that listbox, that name is populated in a cell (T1). I then have worksheet code on the sheet with the indicators as follows: Private Sub Worksheet_Change(ByVal Target As Range) If Range("B10").Value = Range("T1") Then Range("B10").Value = "Complete" End If If Range("B13").Value = Range("T1") Then Range("B13").Value = "Complete" End If ....etc for all the items. It works, problem is, it seems to be killing the tool I'm making as it's draining resources. Is there any way to make it more efficient? I thought about a Case function, but I'm not totally sure how to do it and not sure if it would be faster. I did try adding some code to each if that would ignore the function if it's already marked complete. I have an export button that grabs this sheet and a couple of others later in the tool. I don't need this sheet updated until that point, problem is when you click on something in the listbox, it outputs that name, but when you go to another item, it stops outputing that name and does the new name, that means if I waited until I exported to calculate, it would only get the status of the last name clicked. Sorry for the long description, wanted to be detailed. Thanks |
All times are GMT +1. The time now is 11:18 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com