Help Required In Uploading Excel Files Into Access

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • smugcool
    New Member
    • Apr 2007
    • 81

    #1

    Help Required In Uploading Excel Files Into Access

    hi,
    i am creating a form with a text field and two command buttons in vb 6.0
    I want when somebody will click on command1 button a path will be shown in the text field.

    And for second command button i want when somebody clicks in it, Data will be updated in an access file as we receive excel files on daily basis.

    for command1 i did following but gettting an error of object required and it gets highlighted on Set fd = Application.Fil eDialog(msoFile DialogFilePicke r)

    Private Sub Command1_Click( )
    Const conVerticalOnly As Integer = 2
    'Declare a variable as a FileDialog object.
    Dim fd As FileDialog, strFilesSelecte d As String
    Set fd = Application.Fil eDialog(msoFile DialogFilePicke r)
    'Declare a variable to contain the path, it must be a Variant because

    'of the For..Each construct requires it

    Dim vrtSelectedItem As Variant
    With fd
    .AllowMultiSele ct = True

    .Title = "Browse Files"
    If .Show = -1 Then

    For Each vrtSelectedItem In .SelectedItems

    strFilesSelecte d = strFilesSelecte d & vrtSelectedItem & vbCrLf

    Next vrtSelectedItem

    Else

    'The user pressed Cancel

    End If

    End With

    Set fd = Nothing

    Me![txtDisplayFileN ames ].ScrollBars = conVerticalOnly
    Me![txtDisplayFileN ames] = strFilesSelect
    End Sub


    for command button2 i am not geting any idea how to go ahead.
    KIndly help me.
    i have also added Microsoft office 11.0 object library.
  • smugcool
    New Member
    • Apr 2007
    • 81

    #2
    hi,

    Has anybody is having any idea.....how should i go ahead.

    Plz revert its very urgent requirement for me.

    thanx
    Anup

    Comment

    Working...