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
countlargeproperty functionally samecountproperty, exceptcountproperty generate overflow error if specified range has more 2,147,483,647 cells (one less 2048 columns).countlargeproperty, however, can handle ranges maximum size worksheet, 17,179,869,184 cells.
Comments
Post a Comment