samjones833
New Member
- Joined
- Nov 3, 2022
- Messages
- 5
- Office Version
- 365
- Platform
- Windows
Hello all,
I have written a worksheet change for each individual cell in a range. When the specific cell is changed it then runs a number of clear contents in a module, for example cell M47 value has changed by selecting a different value in the drop down, this will then clear cells N47:V47. If cell N47 is changed it will then clear cells O47:47 but keep the value in cell M47. The problem i am now getting is that the error message procedure is too large. Below is a snippet of the code, any suggestions on how i could rewrite this would much appreciated.
I have written a worksheet change for each individual cell in a range. When the specific cell is changed it then runs a number of clear contents in a module, for example cell M47 value has changed by selecting a different value in the drop down, this will then clear cells N47:V47. If cell N47 is changed it will then clear cells O47:47 but keep the value in cell M47. The problem i am now getting is that the error message procedure is too large. Below is a snippet of the code, any suggestions on how i could rewrite this would much appreciated.
VBA Code:
Private Sub Worksheet_Change(ByVal target As Range)
Application_Disable
' Main pillars fixed half bolster
If Not Intersect(target, Range("M47")) Is Nothing Then
Worksheet_SelectionChangeCentreDrillDirectionPillarsFixedBol
End If
If Not Intersect(target, Range("N47")) Is Nothing Then
Worksheet_SelectionChangeCentreDrillTolerancePillarsFixedBol
End If
If Not Intersect(target, Range("O47")) Is Nothing Then
Worksheet_SelectionChangeCentreDrillTypePillarsFixedBol
End If
If Not Intersect(target, Range("R47")) Is Nothing Then
Worksheet_SelectionChangeCentreDrillMaterialPillarsFixedBol
End If
If Not Intersect(target, Range("S47")) Is Nothing Then
Worksheet_SelectionChangeCentreDrillCoatingPillarsFixedBol
End If
If Not Intersect(target, Range("V47")) Is Nothing Then
Worksheet_SelectionChangeDrillDirectionMainPillarBolster
End If
Application_Enable
End sub