using a With that references the calling object (or something like that)

M

mrsckum

Here's my code:

Private Sub ComboBox2_Change()

Range(ComboBox2.LinkedCell).Value = ComboBox2.Value
ActiveCell.Activate

End Sub

I need to do it like this, because for some reason just letting th
ComboBox update the linked cell causes all of the vlookups tha
reference that linked cell to return #N/A.

The issue is, I have MANY of these combo boxes, and don't want to g
through and change each one of these little functions to correct the
for each combo box. I would like to create a generic function, bu
don't know the correct syntax to do so.

Andr
 
D

Dave Peterson

John Walkenbach shows how to create a class module for buttons on a userform at:
http://j-walk.com/ss/excel/tips/tip44.htm

But when I modified his code for your situation, I had trouble with the function
calling itself recursively.

I'm betting that it's because I you're changing the linked cell in the
combobox_change code.

I think I'd drop the linkedcell completely and handle it all in code.
 
Top