A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Hi Mike G!
To apply the combo box/auto-fill to only one specific data validation list, you need to modify the code so that it only runs for that specific range.
First, you need to change the line "If Target.Validation.Type = 3 Then" to specify the range you want to apply the code to.
For example, if you want to apply it to cells B2:B10, you would change it to:
If Not Intersect(Target, Range("B2:B10")) Is Nothing And Target.Validation.Type = 3 Then
This line will check if the current selection is within the specified range and has a data validation list.
Then, you need to change the line "Set xCombox = xWs.OLEObjects("TempCombo")" to specify the name of the combo box you want to use for this specific range. For example, if the name of the combo box is "Combo1", you would change it to:
Set xCombox = xWs.OLEObjects("Combo1")
Finally, you need to modify the line that sets the LinkedCell property of the combo box to use the address of the first cell in the range, rather than the address of the current selection. For example, if the range is B2:B10, you would change it to:
. LinkedCell = Range("B2"). Address
After making these changes, the code will only apply the combo box/auto fill to the specified range.
Kind Regards, Shakiru