NewOrderFac33
Well-known Member
- Joined
- Sep 26, 2011
- Messages
- 1,283
- Office Version
- 2016
- 2010
- Platform
- Windows
Good morning - just wondering if anyone can help.
I'm attempting to set up a project planning database that will contain a number of sub tasks that will be performed by a named person in a named team.
The idea is that when a team is selected from a drop down list, the adjoing cell's validation will change so that it only contains a drop down list containing members of that specific team.
Each team's members are contained in a specific named range and the whole thing is packaged in worksheet_selectionchange - this idea is that when you change the team, the change is picked up and the adjoing cell will then contain a drop down comprising the named range for that team.
The problem that I have is that I keep getting the following message when Ii change the entry in the "Team" column:
Runtime error -2147417848 (80010108)
Automation error
The object invoked has disconnected from its clients
The funny thing is, that when I click "End", the result is exactly what I wanted - the validation in the adjoining cell correctly reflects the change in the Team Name.
What's going on?
here's a section of the Worksheet_Change code
Originally, instead of
I had
I tried the select to see if the problem lay with setting validation against a target offset, but the results are the same.
This is driving me nuts - any assistance gratefully accepted!
I'm attempting to set up a project planning database that will contain a number of sub tasks that will be performed by a named person in a named team.
The idea is that when a team is selected from a drop down list, the adjoing cell's validation will change so that it only contains a drop down list containing members of that specific team.
Each team's members are contained in a specific named range and the whole thing is packaged in worksheet_selectionchange - this idea is that when you change the team, the change is picked up and the adjoing cell will then contain a drop down comprising the named range for that team.
The problem that I have is that I keep getting the following message when Ii change the entry in the "Team" column:
Runtime error -2147417848 (80010108)
Automation error
The object invoked has disconnected from its clients
The funny thing is, that when I click "End", the result is exactly what I wanted - the validation in the adjoining cell correctly reflects the change in the Team Name.
What's going on?
here's a section of the Worksheet_Change code
Code:
Case Is = "Analysis"
MsgBox ("Analysis")
Target.Offset(0, -4).Resize(1, 17).Interior.ColorIndex = 40
Target.Offset(0, -4).Resize(1, 17).Font.ColorIndex = 1
Target.Offset(0, 1).Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:="=Analysis"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = False
End With
Originally, instead of
Code:
Target.Offset(0, 1).Select
With Selection.Validation
I had
Code:
with target.Offset(0, 1)
This is driving me nuts - any assistance gratefully accepted!