VBA – Save a Chart as a Picture (Gif)

With the current article I will simple present some easy code, transferring Chart (diagram) to a picture. It is not something unusual, but sometimes it may be very handy, if you are trying to use the picture later.

MS_Excel

So, let’s imagine that you want to store the first diagram of your Excel spreadsheet to the location of the Excel file. VBA comes with an easy solution for this. It is the following:

Pretty much, the code can be easily broken, if you set an empty space in the InputBox or a character, forbidden in naming usage. Anyway, that is not the case 🙂 Enjoy it if you can 🙂

About

VBA Developer

Tagged with: , , ,