Disable Click event
Hi all,
I am seeing if anyone can help. I want to run a procedure that inserts a value in a combo box, but everytime I do this it does to the click event for this combo box, which I do not want to happen. I have tryed to disable the click event by using Application.enableevents = false But this does not work Any ideas would be much appreciated. I am using excel 2003 and XP Ashman |
Disable Click event
You need to have a variable similar to enable events, unset it before
inserting, and then reset after mEnableEvents = False 'your insert code here mEnableEvents = True and in the combobox click event If mEnableEvents ' do your click stuf End If -- HTH RP (remove nothere from the email address if mailing direct) "Ashman" wrote in message ... Hi all, I am seeing if anyone can help. I want to run a procedure that inserts a value in a combo box, but everytime I do this it does to the click event for this combo box, which I do not want to happen. I have tryed to disable the click event by using Application.enableevents = false But this does not work Any ideas would be much appreciated. I am using excel 2003 and XP Ashman |
Disable Click event
The easiest might be to use a different event that doesn't get fired such as
mousedown or mouseup instead of click. -- Regards, Tom Ogilvy "Ashman" wrote in message ... Hi all, I am seeing if anyone can help. I want to run a procedure that inserts a value in a combo box, but everytime I do this it does to the click event for this combo box, which I do not want to happen. I have tryed to disable the click event by using Application.enableevents = false But this does not work Any ideas would be much appreciated. I am using excel 2003 and XP Ashman |
Disable Click event
Many thanks Bob. The problem I have now is screen flickering. I have set
screen updating to false. I have 13 combo boxes and each has a click event, therefore they all run through the click event. Is there anyway of taking the screen flickering out? Ashman "Bob Phillips" wrote: You need to have a variable similar to enable events, unset it before inserting, and then reset after mEnableEvents = False 'your insert code here mEnableEvents = True and in the combobox click event If mEnableEvents ' do your click stuf End If -- HTH RP (remove nothere from the email address if mailing direct) "Ashman" wrote in message ... Hi all, I am seeing if anyone can help. I want to run a procedure that inserts a value in a combo box, but everytime I do this it does to the click event for this combo box, which I do not want to happen. I have tryed to disable the click event by using Application.enableevents = false But this does not work Any ideas would be much appreciated. I am using excel 2003 and XP Ashman |
Disable Click event
If Bob's suggestion works, then the click event would not fire and there
would be no flicker. What are you using the suggestion for? -- Regards, Tom Ogilvy "Ashman" wrote in message ... Many thanks Bob. The problem I have now is screen flickering. I have set screen updating to false. I have 13 combo boxes and each has a click event, therefore they all run through the click event. Is there anyway of taking the screen flickering out? Ashman "Bob Phillips" wrote: You need to have a variable similar to enable events, unset it before inserting, and then reset after mEnableEvents = False 'your insert code here mEnableEvents = True and in the combobox click event If mEnableEvents ' do your click stuf End If -- HTH RP (remove nothere from the email address if mailing direct) "Ashman" wrote in message ... Hi all, I am seeing if anyone can help. I want to run a procedure that inserts a value in a combo box, but everytime I do this it does to the click event for this combo box, which I do not want to happen. I have tryed to disable the click event by using Application.enableevents = false But this does not work Any ideas would be much appreciated. I am using excel 2003 and XP Ashman |
All times are GMT +1. The time now is 05:28 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com