Updating ComboBox ListFillRange

Carly

Active Member
Joined
Aug 21, 2002
Messages
370
I have a report template which contains a combobox which has a ListFillRange which is a Named Range. The combobox has a OnChange macro which kicks in when the end user selects an option from the combobox.

The problem I have is every month the report changes & I have to refresh the values in the Named Range due to additions or removals. When I copy & paste the new data into the area where the old Named Range is, the OnChange macro kicks in. Is there anyway I can stop this from happening. I have tried to use EnableEvents = False, but this does not work.

Any help would be greatly received.

Kind Regards
 

Momentman

Well-known Member
Joined
Jan 11, 2012
Messages
3,963
Maybe not the most elegant of solutions.

But since its once in a month, can't you just comment out the block of code, then paste in the new area, uncomment the code, update and move on

And btw, how are you using the Application.EnableEvents property?
 

Carly

Active Member
Joined
Aug 21, 2002
Messages
370
Thanks for the response.

Commenting out the code is not an option. This is a monthly report which I need to be completely automated.

I was just putting Application.EnableEvents = False before my copy & paste code but it didn't do anything. Probably using it incorrectly to be honest :)
 

Forum statistics

Threads
1,082,450
Messages
5,365,591
Members
400,840
Latest member
Fortune

Some videos you may like

This Week's Hot Topics

Top