VB获取最大行数

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim l As Integer
        l = Me.Range("a65536").End(Excel.XlDirection.xlUp).Row
        MessageBox.Show(l.ToString())
    End Sub
相比C#代码简单了很多

你可能感兴趣的:(vb)