T
TheDrescher
I keep getting stuck on a workbook I'm finishing up. Basically it displays
information on a front sheet that pulls from arrays on other sheets based on
a drop down selection (employee name) in cell A9. There is one other cell on
the front sheet (which I've named CoachRating) which is a drop down list that
affects some metrics on the arrays. My problem is, when someone changes the
employee name in cell A9, the value in the CoachRating cell stays at whatever
was selected for the previous name. I'd like to have it set at a default
value (Select) whenever a change is made to cell A9. I've written this code
so far, but I keep getting an error:
Private Sub Worksheet_Change(ByVal Target As Range)
Const empNameCell = "$A$9"
Const csSheetName = "MainPage"
Const csCell = "CoachRating"
Const csDefault = "Select"
If Target.Address <> empNameCell Then
Exit Sub
End If
SalesManagersCoachingReport.Worksheets(MainPage).Range(CoachRating) =
csDefault
End Sub
I keep getting a runtime '424' error stating 'object required' and
highlighting this line in the script debugger:
SalesManagersCoachingReport.Worksheets(MainPage).Range(CoachRating) =
csDefault
Is there something I'm doing wrong here? Thanks!
information on a front sheet that pulls from arrays on other sheets based on
a drop down selection (employee name) in cell A9. There is one other cell on
the front sheet (which I've named CoachRating) which is a drop down list that
affects some metrics on the arrays. My problem is, when someone changes the
employee name in cell A9, the value in the CoachRating cell stays at whatever
was selected for the previous name. I'd like to have it set at a default
value (Select) whenever a change is made to cell A9. I've written this code
so far, but I keep getting an error:
Private Sub Worksheet_Change(ByVal Target As Range)
Const empNameCell = "$A$9"
Const csSheetName = "MainPage"
Const csCell = "CoachRating"
Const csDefault = "Select"
If Target.Address <> empNameCell Then
Exit Sub
End If
SalesManagersCoachingReport.Worksheets(MainPage).Range(CoachRating) =
csDefault
End Sub
I keep getting a runtime '424' error stating 'object required' and
highlighting this line in the script debugger:
SalesManagersCoachingReport.Worksheets(MainPage).Range(CoachRating) =
csDefault
Is there something I'm doing wrong here? Thanks!