User-defined type not defined

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AllusiveKitten
    New Member
    • Feb 2007
    • 43

    User-defined type not defined

    Hi

    I am having an issue with the following coding throwing back an error after I have converted a database to 2002-2003 File Format so that I can MBE the database.

    Code:
    Private Sub Btn_Hyperlink_Click()
    Dim dlgPickFiles As FileDialog
    Dim strFilePath As String
     
    Set dlgPickFiles = Application.FileDialog(msoFileDialogFilePicker)
        
    With dlgPickFiles
      .AllowMultiSelect = False
      .Filters.Clear
      .Filters.Add "Adobe Files", "*.pdf"
    End With
        
    If dlgPickFiles.Show Then
      strFilePath = dlgPickFiles.SelectedItems.Item(1)
    End If
    
    'strCompleteHyperlink is Declared in the Form's Code Module
    '(Private strCompleteHyperlink As String)
    strCompleteHyperlink = strFilePath & "#" & strFilePath
        
    Set dlgPickFiles = Nothing
    Me.Txt_HyperLink = strFilePath
    End Sub
    The user-defined error is coming up at the line
    Code:
    Dim dlgPickFiles As FileDialog
    . When I check the difference in the references, the reference "Microsoft Common Dialog Control 6.0 (SP3)" is in the uncovented database and it does not appear at all in the 200-2003 version.

    If anyone could help me solve this little query I would be most appreciated.

    Thank you
    AK
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    The FileDialog class should be in the Microsoft Office 11.0 Objects Library. Check your references to make sure you have that.

    Comment

    • AllusiveKitten
      New Member
      • Feb 2007
      • 43

      #3
      Originally posted by Rabbit
      The FileDialog class should be in the Microsoft Office 11.0 Objects Library. Check your references to make sure you have that.
      Thank you Rabbit,
      You are an absolute treasure, I just may have some hair left after this little exercise now.
      Cheers
      AK

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        Not a problem, good luck.

        Comment

        Working...