I've followed the Getting Started examples and all worked okay. So I've tried to get the following VBA code working
Public Function LastRow(ByVal rng As Range) As Long
LastRow = rng.Find(What:="*", SearchDirection:=xlPrevious, SearchOrder:=xlByRows).Row
End Function
using
<DnaLibrary RuntimeVersion="v4.0">
<![CDATA[
Public Module Module1
Public Function LastRow(ByVal rng As Range) As Long
LastRow = rng.Find(What:="*", SearchDirection:=xlPrevious, SearchOrder:=xlByRows).Row
End Function
End Module
]]>
</DnaLibrary>
However, this produces errors. So I've attempted to port to VB.NET using
<DnaLibrary RuntimeVersion="v4.0">
<![CDATA[
Public Module Module1
Public Function LastRow(ByVal rng As Microsoft.Office.Interop.Excel.Range) As Long
LastRow = rng.Find(What:="*", SearchDirection:=Microsoft.Office.Interop.Excel.XlSearchDirection.xlPrevious, SearchOrder:=Microsoft.Office.Interop.Excel.XlSearchOrder.xlByRows).Row
End Function
End Module
]]>
</DnaLibrary>
again, this is not working. Please can I have a few hints on what I'm doing wrong :)
Thanks
Q
