Hello.
I am new to Excel VBA and am making progress but am having a tough time with getting a VBA event to trigger when selecting different Cases in a dropdown
Below is some simple code I have written just to find a way to get the code right.
I have a drop down field (AE48) and the validated cells are W77:W79
Ultimately I want to write more sophisticated code when the drop down (data validation) cell is changed but first want to confirm I am coding right to have an event trigger when I change the drop down
In advance, thank you
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("W77:W79")) Is Nothing Then
Cancel = True
ActiveSheet.Range("AE48").Value = ActiveCell.Value
If Sheets("Sheet1").Range("AE48").Value - "Floating" Then
Sheets("Sheet1").Range("A1").Value = 6
Else
Sheets("Sheet1").Range("A1").Value = 5
End If
End Sub
I am new to Excel VBA and am making progress but am having a tough time with getting a VBA event to trigger when selecting different Cases in a dropdown
Below is some simple code I have written just to find a way to get the code right.
I have a drop down field (AE48) and the validated cells are W77:W79
Ultimately I want to write more sophisticated code when the drop down (data validation) cell is changed but first want to confirm I am coding right to have an event trigger when I change the drop down
In advance, thank you
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("W77:W79")) Is Nothing Then
Cancel = True
ActiveSheet.Range("AE48").Value = ActiveCell.Value
If Sheets("Sheet1").Range("AE48").Value - "Floating" Then
Sheets("Sheet1").Range("A1").Value = 6
Else
Sheets("Sheet1").Range("A1").Value = 5
End If
End Sub