Results 1 to 6 of 6
  1. #1
    2 Star Lounger
    Join Date
    Jan 2003
    Location
    Toledo, Ohio, USA
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Macro converted to function won't work the same

    Post deleted by jp2558

  2. #2
    Lounger
    Join Date
    Feb 2001
    Location
    TX, USA
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro converted to function won't work the same

    please post the code access created so we can see what is happening

  3. #3
    2 Star Lounger
    Join Date
    Jan 2003
    Location
    Toledo, Ohio, USA
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro converted to function won't work the same

    Function modImportInvitees()
    On Error GoTo modImportInvitees_Err

    DoCmd.TransferSpreadsheet acImport, 8, "tblInviteeImportWorkfile", "c:tempevent.dif", True, ""
    Beep
    MsgBox "Invitee Import Completed Sucessfully.", vbInformation, "Invitee Import Process"
    DoCmd.Close acForm, "Import_Invitees"


    modImportInvitees_Exit:
    Exit Function

    modImportInvitees_Err:
    MsgBox Error$
    Resume modImportInvitees_Exit

    End Function

  4. #4
    2 Star Lounger
    Join Date
    Jan 2003
    Location
    Toledo, Ohio, USA
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro converted to function won't work the same

    I hope this helps. Thanks

  5. #5
    2 Star Lounger
    Join Date
    Jan 2003
    Location
    Toledo, Ohio, USA
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro converted to function won't work the same

    Never mind - after hours of frustration I've convinced the user that they must save their data to excel and then 'save_as' from excel as a *.CSV file. Seems to be an effective workaround.

  6. #6
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Macro converted to function won't work the same

    I suspect the problem is that the file you're trying to import doesn't have an xls extension. TransferSpreadsheet is not one of my favorite actions, and it breaks easily. However, just changing the name of your file from a .dif to a .xls might solve your problem. Does Excel recognize the file if you try to open it with that extension?
    Charlotte

Posting Permissions

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