docs:programming:office_vba:with_end_with

With...End With

This saves you from typing what comes after “With” every time you need a property or method.

With Worksheets("Sheet 1")
    .Range("A10").Value = .Range("C2").Value
End With
 
' the above would be the same as:
' Worksheets("Sheet 1").Range("A10").Value = Worksheets("Sheet 1").Range("C2").Value
  • docs/programming/office_vba/with_end_with.txt
  • Last modified: 2008/08/03 00:25
  • by 127.0.0.1