Excel VBA - Attach A File To An Excel Spreadsheet


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Excel VBA - Attach A File To An Excel Spreadsheet

  1. #1
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666

    Excel VBA - Attach A File To An Excel Spreadsheet

    I see what I can insert an object, and that object can be something like a Word document or WordPad document or the like. This would actually insert the contents into my spreadsheet (at least that is the way I'm reading it.)

    However, is there a way to "attach" a file in the same way we can attach a file to an EMail message?
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

  2. #2
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    I think I might have it.

    When you insert object, pick the tab 'create from file', browse to the file you want, then click the checkbox labeled 'Display as ICON' before clicking ok.

    Now, all I need to do is perform this while running a macro, and I should have the code I need.
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

Similar Threads

  1. Replies: 0
    Last Post: 05-15-2008, 05:24 PM
  2. excel vba file search
    By batman61 in forum VB Classic
    Replies: 5
    Last Post: 02-11-2008, 02:51 PM
  3. How to Attach a file in VB
    By azhagiri in forum VB Classic
    Replies: 11
    Last Post: 01-24-2007, 03:43 AM
  4. NullPointerException when reading text file
    By Andrew McLellan in forum Java
    Replies: 3
    Last Post: 05-09-2001, 06:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center