excel - Target.count causing an Overflow error -


i have worksheet_selectionchange function in first line wanted condition if more 1 cell selected exit wrote:

    if target.cells.count > 1 exit sub 

however, when select whole worksheet, error message: "run time error 6 - overflow"

it seems target.count cant handle such large #'s ?

what can around this?

thanks david

replace count countlarge.

documentation: http://msdn.microsoft.com/en-us/library/office/ff196838(v=office.15).aspx

the countlarge property functionally same count property, except count property generate overflow error if specified range has more 2,147,483,647 cells (one less 2048 columns). countlarge property, however, can handle ranges maximum size worksheet, 17,179,869,184 cells.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

jquery - Keeping Kendo Datepicker in min/max range -