2

它看起来像这样

Function COL()

   COL = WorksheetFunction.Column()

End Function
4

1 回答 1

0

Application.Caller将为您提供对单元格的引用,您可以从中获取列。例如

Public Function COL()
    Select Case TypeName(Application.Caller)
    Case "Range"
       COL = Application.Caller.Column
    Case Else
       COL = "unknown"
    End Select
End Function
于 2012-10-09T08:06:44.547 回答