Changing linked cell runs ComboBox code

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.
 
D

Dave Peterson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top