| 
    
     |  | わかりました。 丁寧な回答
 ありがとうございます。
 
 
 ▼kanabun さん:
 >▼ふめい さん:
 >>With ABC
 >> lastrow = .UsedRange.Rows(.UsedRange.Rows.Count).Row
 >>End With
 >>
 >>と
 >>
 >>With ABC.UsedRange
 >> lastrow=.Rows(.Rows.Count).Row
 >>End With
 >>
 >>
 >>は同じですよね?
 >
 >(1)
 >  Set ABC = ActiveSheet
 >  With ABC
 >    lastRow = .UsedRange.Rows(.UsedRange.Rows.Count).Row
 >  End With
 >
 >と
 >(2)
 >  Set ABC = ActiveSheet
 >  With ABC.UsedRange
 >    lastRow = .Rows(.Rows.Count).Row
 >  End With
 >
 >と
 >(3)
 >  Set ABC = ActiveSheet
 >  With ABC.UsedRange.Rows
 >    lastRow = .Item(.Count).Row
 >  End With
 >
 >は同じです。
 >
 >(2) できれば (3) を推奨。
 
 
 |  |