+ Reply to Thread
Results 1 to 2 of 2

VBA to open saved GIF of chart with dynamic save location

  1. #1
    Registered User
    Join Date
    10-04-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    3

    VBA to open saved GIF of chart with dynamic save location

    Hi,

    I have created a Userform that collects some data from a text file and then creates a chart, the code then saves this chart as a GIF file is below

    Please Login or Register  to view this content.
    The reason I save it to Application.Default is that I am writing this code for other people in my office. Their My document folder will have a completely differnt path to mine due to servers and user names.

    At the end of the userform I have the workbook close without saving, which is intended. What I would like to happne is before the workbook closes is for the GIF to be opened in either Internet explorer or Windows Picture and fax viewer.
    I have tried Shell commands with the same "fname" but it won't work.

    Any help would be great. Cheers
    Last edited by chiplaidlaw; 10-15-2012 at 04:51 AM. Reason: Use code tags in future.

  2. #2
    Registered User
    Join Date
    10-04-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: VBA to open saved GIF of chart with dynamic save location

    Hi,

    I have solved this myself, I was making life very difficult and not reading what I had put in the macro. The solution I have used is below

    Please Login or Register  to view this content.
    The reason I was having issues was I had put fname is quotation marks. Simple mistake but caused a lot of hassle.
    Last edited by Cutter; 10-15-2012 at 12:41 PM. Reason: Added code tags

+ 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