Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Workbook_SheetChange won't run
My understanding of Workbook_SheetChange is that with ANY change ANYWHERE in
the workbook, the code runs, correct? I can't get it to work and don't know why: GOAL: Resort the "PatientNamesRooms" (just a list of about 60 names and associated hospital room numbers) whenever a change is made on a different tab within the workbook. Cells in "PatientNamesRooms" are index formulas that get names based on room numbers from a main roster of names. We need to quickly find the name alphabetically to determine what room they're in. I've gotten the code to run (names to sort) using Worksheet SelectionChange. But that doesn't meet my need. It needs to resort anytime someone updates a name in the roster (like when a patient leaves or is admitted on the floor). CODE THAT WON'T RUN: Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Source As Range) Range("PatientNamesRooms").Select Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal End Sub Help? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Workbook_SheetChange | Excel Programming | |||
Workbook_SheetChange not working | Excel Programming | |||
Workbook_SheetChange | Excel Programming | |||
workbook_sheetchange | Excel Programming | |||
Workbook_SheetChange will not fire | Excel Programming |