ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Changing linked cell runs ComboBox code (https://www.excelbanter.com/excel-programming/395988-changing-linked-cell-runs-combobox-code.html)

hmm

Changing linked cell runs ComboBox code
 
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.

Dave Peterson

Changing linked cell runs ComboBox code
 
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



hmm wrote:

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.


--

Dave Peterson


All times are GMT +1. The time now is 01:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com