John S Clark
New Member
- Joined
- Apr 15, 2021
- Messages
- 5
- Office Version
- 365
- Platform
- Windows
Hi,
I have an old excel file (XLSB) that I wrote to help others understand how VLookups actually work, as I kept getting the same questions about 'Why is it not working this time when I have done everything the same', this will have been created in about 2013/2014.
Within the file I have a explanation sheet, which contains user selectable/editable Lookup Values/ TableArrays / Column Indexes and code sitting in the background to change the visual explanation beneath the fields. This worked a treat, however having shared the file with others today, I have found the sheet code which triggers the background code to change the visuals is no longer triggering and I dont understand why. Can you give me any pointers?
Macro that changes the cell formatting / visual explanation = 'VLookUpExplaination'
- Note this code runs perfectly well, when triggered manually - it successfully picks up the user entered values and updates the explanation further down the sheet.
Sheet Code (Bit that is not working)
I can confirm, Marcos are enabled, the code behind "VLookUpExplaination" works as expected and does not error - its only the worksheet trigger that is the issue. No errors are given, I have tried enabling Events as I saw that on a different post, but that has not helped either.
Any support will be greatly appreciated.
I have an old excel file (XLSB) that I wrote to help others understand how VLookups actually work, as I kept getting the same questions about 'Why is it not working this time when I have done everything the same', this will have been created in about 2013/2014.
Within the file I have a explanation sheet, which contains user selectable/editable Lookup Values/ TableArrays / Column Indexes and code sitting in the background to change the visual explanation beneath the fields. This worked a treat, however having shared the file with others today, I have found the sheet code which triggers the background code to change the visuals is no longer triggering and I dont understand why. Can you give me any pointers?
Macro that changes the cell formatting / visual explanation = 'VLookUpExplaination'
- Note this code runs perfectly well, when triggered manually - it successfully picks up the user entered values and updates the explanation further down the sheet.
Sheet Code (Bit that is not working)
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$C$2" Then
'MsgBox "LookupValue value modified"
Call VLookUpExplaination
Range("C3").Select
End If
If Target.Address = "$D$2" Then
'MsgBox "TableArray value modified"
Call VLookUpExplaination
Range("D2").Select
End If
If Target.Address = "$E$2" Then
'MsgBox "Column Index value modified"
Call VLookUpExplaination
Range("E2").Select
End If
End Sub
I can confirm, Marcos are enabled, the code behind "VLookUpExplaination" works as expected and does not error - its only the worksheet trigger that is the issue. No errors are given, I have tried enabling Events as I saw that on a different post, but that has not helped either.
Any support will be greatly appreciated.