View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Erin Erin is offline
external usenet poster
 
Posts: 11
Default define cell for autofit of merged cells

Hello,
I've got Jim Rech's sub for autofit of merged cells,
http://www.google.com/groups?threadm=uGMQVjd0CHA.2296%
40TK2MSFTNGP10

I want to use sub to adjust row 16 before print. I've
put it in the ThisWorkbook object. My problem is defining
row 16. I've tried...

1) defining CurrCell with
Set CurrCell = Worksheets("Sheet1").Range("A16:H16")

2) using
With Range ("A16:H16")
instead of
If ActiveCell.MergeCells Then
With ActiveCell.MergeArea

3) both of the above with ("A16") instead of ("A16:H16")

4) generally butchering a perfectly good working sub in
multiple ways :-)

A simple fix I'm sure, but I'm stumped.

Thanks in advance!