+ Reply to Thread
Results 1 to 3 of 3

How to programatically embed an ICO File and a TXT file in same folder

  1. #1
    Registered User
    Join Date
    09-27-2012
    Location
    Mumbai, IN
    MS-Off Ver
    Office 365
    Posts
    97

    How to programatically embed an ICO File and a TXT file in same folder

    Ok, Guys Here's what I need help with. I have an excel file that uses Chip Pearson's code to change the Icon. This File also creates its logs; hence a text file is also placed in the same folder. The first things I need help with: What I am thinking of doing is, On workbook close event, I want a Macro to embed those files into the workbook (Ico and txt file).


    Secondly, When the workbook opens (Even if at a different location), The workbook places those embedded ico and txt files in the same folder so that they can be used for the purpose of changing the icon and also being the default log file

    For the example: Workbook is Named: mywb.xlsm, icon file: TestIcon.ico, Log File: Mylogs.txt
    Last edited by yoursamrit2000; 02-20-2019 at 03:00 AM.

  2. #2
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,150

    Re: How to programatically embed an ICO File and a TXT file in same folder

    Just to give an idea about embedding and exporting an ico file, you can use the procedures below...

    This one will embed an ico file into the active sheet at range C10;

    Please Login or Register  to view this content.
    And, this one will extract the embedded file into the same folder with the Excel file;

    Please Login or Register  to view this content.
    You can ammend the codes to suit your needs ...
    Last edited by Haluk; 02-20-2019 at 03:42 AM.

  3. #3
    Registered User
    Join Date
    09-27-2012
    Location
    Mumbai, IN
    MS-Off Ver
    Office 365
    Posts
    97

    Re: How to programatically embed an ICO File and a TXT file in same folder

    Thanks a Ton, Haluk. That did the trick. I was able to achieve what I wanted.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Vba save csv file but ask for file name or select file name from folder
    By Grahamfeeley in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-31-2017, 12:30 AM
  2. Embed Thumbnails in column B with file name in column A from folder jpg file
    By rokynrobyn in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-06-2014, 11:57 AM
  3. [SOLVED] Need help to save file to new folder and delete old file using same file name
    By tuongtu3 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-14-2012, 11:16 PM
  4. Generate File Name Programatically
    By T.J. Lanza in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-19-2009, 02:11 PM
  5. Programatically create bmp/jpg/gif file
    By incjourn in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-13-2009, 05:45 PM
  6. [SOLVED] import file programatically
    By Newbie in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-09-2005, 10:50 AM
  7. [SOLVED] macro to move from file to file, folder to folder
    By davegb in forum Excel General
    Replies: 0
    Last Post: 01-21-2005, 04:06 PM

Tags for this Thread

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