Changing linked cell runs ComboBox code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I run a macro with a line that changess a cell also linked to a ComboBox.
After changing this cell, the ComboBox code is called, undesiredly.

How do I disable the calling of ComboBox code from a macro that changes the
ComboBox linked cell?

Thanks.
 
I don't think you can.

You could drop the linkedness and do everything in code.

or you could declare a public variable in a General module and do something
like:

Public BlkProc as boolean

sub yoursub()
blkproc = true
activesheet.range("a1").value = "hi"
blkproc = false
end sub

Then in the combobox code:

sub comboboxsub()

if blkproc then exit sub 'just get out

'your code here
end sub
 
Back
Top