Count merged cells

  • Thread starter Thread starter jlclyde
  • Start date Start date
J

jlclyde

I have a form and when it loads I want it to calculate how many merged
cells are in selection.

RnSz = Selection.Cells.MergeArea.Count - is what I thought it shoudl
be but it keeps giving me Application-defined or object-defined
error. I am not sure what this is telling me.

Any help is appreciated,
Jay
 
I have a form and when it loads I want it to calculate how many merged
cells are in selection.

RnSz = Selection.Cells.MergeArea.Count  - is what I thought it shoudl
be but it keeps giving me Application-defined or object-defined
error.  I am not sure what this is telling me.

Any help is appreciated,
Jay

For those of you who are concerned, I found the answer. My current
selection was through S1:AI9, so I had to resize it first. so it is
now RnSz = Selection.resize(1,1).cells.mergearea.count.

Sorry,
Jay
 
Back
Top