+ Reply to Thread
Results 1 to 6 of 6

attach file as icon in a worksheet (hope it's not so tricky)

Hybrid View

  1. #1
    jacko
    Guest

    attach file as icon in a worksheet (hope it's not so tricky)

    i wish to create a button (from forms) and when click on it, it will pop up
    the Insert Object dialog box, and automatically go to Create From File tab
    with Display As Icon selected. Then it allows the user to select any file to
    attach to the worksheet.

    how do i do this with the button and macro? i hope it's not the tricky one
    and appreciate experts out there can help.

  2. #2
    Vasant Nanavati
    Guest

    Re: attach file as icon in a worksheet (hope it's not so tricky)

    Not completely reliable, but:

    SendKeys "{TAB}{TAB}{TAB}{TAB}{RIGHT}%a%n"
    Application.Dialogs(xlDialogInsertObject).Show

    --

    Vasant



    "jacko" <jacko@discussions.microsoft.com> wrote in message
    news:579037D4-0BF6-41BD-BE65-FB2730E056DA@microsoft.com...
    > i wish to create a button (from forms) and when click on it, it will pop

    up
    > the Insert Object dialog box, and automatically go to Create From File tab
    > with Display As Icon selected. Then it allows the user to select any file

    to
    > attach to the worksheet.
    >
    > how do i do this with the button and macro? i hope it's not the tricky one
    > and appreciate experts out there can help.




  3. #3
    Tom Ogilvy
    Guest

    Re: attach file as icon in a worksheet (hope it's not so tricky)

    Sub showDialog()
    'INSERT.OBJECT?(object_class, file_name, link_logical,
    ' display_icon_logical, icon_file, icon_number, icon_label)
    ExecuteExcel4Macro "INSERT.OBJECT?(,""C:\"",False,True,)"
    End Sub


    --
    Regards,
    Tom Ogilvy


    "jacko" <jacko@discussions.microsoft.com> wrote in message
    news:579037D4-0BF6-41BD-BE65-FB2730E056DA@microsoft.com...
    > i wish to create a button (from forms) and when click on it, it will pop

    up
    > the Insert Object dialog box, and automatically go to Create From File tab
    > with Display As Icon selected. Then it allows the user to select any file

    to
    > attach to the worksheet.
    >
    > how do i do this with the button and macro? i hope it's not the tricky one
    > and appreciate experts out there can help.




  4. #4
    Vasant Nanavati
    Guest

    Re: attach file as icon in a worksheet (hope it's not so tricky)

    Nice one, Tom!

    Regards,

    Vasant

    "Tom Ogilvy" <twogilvy@msn.com> wrote in message
    news:%2329lWwxTFHA.2532@TK2MSFTNGP10.phx.gbl...
    > Sub showDialog()
    > 'INSERT.OBJECT?(object_class, file_name, link_logical,
    > ' display_icon_logical, icon_file, icon_number, icon_label)
    > ExecuteExcel4Macro "INSERT.OBJECT?(,""C:\"",False,True,)"
    > End Sub
    >
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    >
    > "jacko" <jacko@discussions.microsoft.com> wrote in message
    > news:579037D4-0BF6-41BD-BE65-FB2730E056DA@microsoft.com...
    > > i wish to create a button (from forms) and when click on it, it will pop

    > up
    > > the Insert Object dialog box, and automatically go to Create From File

    tab
    > > with Display As Icon selected. Then it allows the user to select any

    file
    > to
    > > attach to the worksheet.
    > >
    > > how do i do this with the button and macro? i hope it's not the tricky

    one
    > > and appreciate experts out there can help.

    >
    >




  5. #5
    jacko
    Guest

    Re: attach file as icon in a worksheet (hope it's not so tricky)

    Excellent!!! Billions thanks to Tom!! and Vasant too!

    "Tom Ogilvy" wrote:

    > Sub showDialog()
    > 'INSERT.OBJECT?(object_class, file_name, link_logical,
    > ' display_icon_logical, icon_file, icon_number, icon_label)
    > ExecuteExcel4Macro "INSERT.OBJECT?(,""C:\"",False,True,)"
    > End Sub
    >
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    >
    > "jacko" <jacko@discussions.microsoft.com> wrote in message
    > news:579037D4-0BF6-41BD-BE65-FB2730E056DA@microsoft.com...
    > > i wish to create a button (from forms) and when click on it, it will pop

    > up
    > > the Insert Object dialog box, and automatically go to Create From File tab
    > > with Display As Icon selected. Then it allows the user to select any file

    > to
    > > attach to the worksheet.
    > >
    > > how do i do this with the button and macro? i hope it's not the tricky one
    > > and appreciate experts out there can help.

    >
    >
    >


  6. #6
    Registered User
    Join Date
    05-02-2005
    Posts
    2
    Is there any way to make this work in a Shared Workbook?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1