Use the Application.Selection object. RRS feed

  • Question

  • I selected a range and now I want to use the selection object, but it throws an exception when I try to downcast it to Range and then call a function. What can I do?



    Thursday, August 5, 2010 12:21 PM


  • What does your code look like. This will work: Sub dural() Dim r As Range Set r = Selection MsgBox Application.WorksheetFunction.Sum(r) End Sub
    • Marked as answer by Bessie Zhao Thursday, August 12, 2010 9:31 AM
    Thursday, August 5, 2010 3:14 PM