Need a userform in an email

Lambo

Board Regular
Joined
Jan 25, 2010
Messages
50
Hi all,

I have created a system in excel with a vba front end to manipulate information. I works fine except I have a need to generate a letter. I have a userform which does the trick fine. When I wish to print the letter I just expant the hight and do a Userform1.printform
All ok so far, but my users might need to email the letter rather than print out. Thought Cttr alt printscreen was answer, just copy and paste into email but alas no.I only get as much as the current userform window that is being displayed on screen and since it is an a4 size letter the bottom does appear off screen. Do not want to populate a worksheet if i can help it. If I can printform to a printer can I print to a file so I could attach to an email.
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Why not populate a worksheet?

It would be pretty straightforward to do that and you could even use a temporary worksheet.

The the temporary worksheet could be created, populated, sent and then deleted.

Or, assuming you are already using code for the email, you could add to it so the values from the userform are included in the body.

How do that, and anything like this, really depends on what email client you are using.
 
Upvote 0
the worksheet is a back up plan but if I can send a userform to a printer in 1 line why cant I send it to a file in 1 line. it would be much easier than muching about with worksheets. I do like the temporary worksheet idea though!
 
Upvote 0
Do you mean mucking about?

It would actually be quite straightforward to transfer the data from the userform to a worksheet.

Also what type of file would you send the userform to?
 
Upvote 0
yes mucking, sorry.
I have 15 userforms, just didnt want to send data to sheets.
what about sending to a text file?
capturing the userform as an image?
it seems userforms are not catered for well when it comes to displaying the content outside the vba environment
 
Upvote 0

Forum statistics

Threads
1,224,607
Messages
6,179,871
Members
452,948
Latest member
UsmanAli786

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