ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using VB to Convert Single Worksheet to PDF then Email? (https://www.excelbanter.com/excel-programming/356995-using-vbulletin-convert-single-worksheet-pdf-then-email.html)

[email protected]

Using VB to Convert Single Worksheet to PDF then Email?
 
Hi, everyone -

I know it's been a long time, but I thought I'd jump back in with a
doozie that I've been struggling with. I 've included a small bit of
code below that is a small part of a much larger strip. Basically, what
I use this bit for is to send a copy of one worksheet, out of a much
larger income calculation spreadsheet, to a staff person.

It works really slick, but I have one problem: when the staff person
gets the email and opens the copies single worksheet, it gives a couple
messages about wanting to update the formulas in the worksheet itself.
I'm thinking, to eliminate these messages, I'm hoping there is a way to
modify my code that that, maybe, after ActiveSheet.Copy, I can convert
the worksheet to a pdf..... then finish out the code. Has anyone had
any success in doing this before?

Code:

If Sheets("Data_Entry_Sheet").[k107] "" Then
Sheets("FSS_Worksheet").Unprotect ("led52not")
Sheet20.Select
ActiveSheet.Copy
ActiveWorkbook.SendMail ", Subject:=" FSS
Escrow Sheet"
ActiveWorkbook.Close False

ActiveSheet.Shapes("object 6.wav").Select 'fss reminder msg'
Selection.Verb Verb:=xlPrimary

MyTimer = Timer
Do
Loop While Timer - MyTimer < 4

paperwarning = MsgBox("I HAVE HEARD THE REMINDER MESSAGE AND PROMISE,
UPON PENALTY OF SOMETHING REALLY BAD HAPPENING, THAT I WILL PASS ON
ACCOUNTING'S COPY OF THE FSS WORKSHEET TO THE APPROPRIATE STAFF
PERSON.", vbOKOnly, "REMEMBER TO PROPERTLY DISTRIBUTE COPIES OF FSS
WORKSHEETS!!!")
Sheets("FSS_Worksheet").Protect ("led52not")
Sheet2.Select
[a1].Select
Sheets("data_entry_sheet").Protect ("led52not")


Thanks to everyone for the help.

Take care.

Golf


[email protected]

Using VB to Convert Single Worksheet to PDF then Email?
 
Just wanted to see if I could bump this one up a little...... Thanks



All times are GMT +1. The time now is 11:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com