Options

Stuck

toshitaporitoshitapori Member Posts: 52
Hi All,
I am stuck on a problem let see if anyone can help me on that .
I am trying to import the data from spreadsheet. Now i am using my own
dialog windows to show progress. Is there any way where my dataimport
can know how many records will going to be imported from spreadsheet .
at the starting .

its like on tables as we use count functions which tell us how many records something similar to that .Any help is highly appreciated .

Best Regards,
Toshitapori

Comments

  • Options
    kinekine Member Posts: 12,562
    You are using standard Excel buffer or your own way to import the file? If your own, you can use something as in example from VB help for property Count:
    Example
    This example displays the number of columns in the selection on Sheet1. The code also tests for a multiple-area selection; if one exists, the code loops on the areas of the multiple-area selection.

    Sub DisplayColumnCount()
    Dim iAreaCount As Integer
    Dim i As Integer

    Worksheets("Sheet1").Activate
    iAreaCount = Selection.Areas.Count

    If iAreaCount <= 1 Then
    MsgBox "The selection contains " & Selection.Columns.Count & " columns."
    Else
    For i = 1 To iAreaCount
    MsgBox "Area " & i & " of the selection contains " & _
    Selection.Areas(i).Columns.Count & " columns."
    Next i
    End If
    End Sub
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.