Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2002
    Posts
    33

    Post Unanswered: OpenDialogwith problems

    This is the code:
    Private Sub Command2_Click()
    Dim dlg As New CommonDialog
    If Me.Combo0.Value = "Excel" Then
    'import excel files
    dlg.DialogTitle = "Import Excel"
    dlg.Filter = "Excel|*.xls"
    dlg.ShowOpen
    DoCmd.TransferSpreadsheet acImport, , "TableName", dlg.FileName, True, "B2:I12"
    End If
    End Sub

    Well, when I run this code I get this message:
    "Run-Time Error 20476
    Method 'ShowOpen' of object '|CommonDialog' failed"
    Where is the error. Do I miss something?
    Please HELP!!!!!!!!!

    Thanks
    PacuIonut

  2. #2
    Join Date
    Feb 2002
    Location
    San Antonio, TX
    Posts
    69
    Did you set the reference to the Microsoft Common Dialog Control? Tools->References......
    "Doing stuff is overrated. Take Hitler for example. He did lots but don't we all wish he'd have just stayed home and gotten stoned?"

  3. #3
    Join Date
    Jun 2002
    Posts
    33

    hello

    Originally posted by punkerboy
    Did you set the reference to the Microsoft Common Dialog Control? Tools->References......
    Yes I set the references. Now I'm receiving the message that I do not have the license to use this ActiveX
    PacuIonut

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •