Save userform controls as picture

Jinxster

New Member
Joined
Nov 14, 2018
Messages
4
Hello,

I'm trying to develop a macro that updates/generates the footer/header of excel files for my company.
The first version of this macro uses a sheet to store the required info (pics, text) and it works.
I want to go one step further and eliminate the sheet where the macro info is stored by moving all required info in userforms.

So, I have UserForm1 which has the company logo picture. This is saved using
Code:
SavePicture UserForm1.Logo.Picture, "D:\Logo.png"
where Logo is an Image control.

In UserForm2, I have a Frame control (named FooterText), populated with labels which need to be updated prior to saving the entire frame as png (or whatever picture format). Needless to say that
Code:
SavePicture UserForm2.FooterText.Picture, "D:\Footer.png"
does not work. The text for the footer exceeds the limit set by office and as such, can only be added as a picture.

Are there any options for me at this point? Is there a simple solution for exporting userform controls as picture? I don't want to complicate things by adding new references since it will be required by all company users.
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top