Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving a worksheet with links
Thanks so much Ron for your help. Please understand however that as fa as programing goes I'm just a hack now. Just good at copying an slightly modifiing code. Bellow is the part of my code that saves the file. I honestly do no know how to modifiy using your additional. Thanks so much again fo your contuned help. Sh.Copy ActiveSheet.Copy Cells.Copy Cells.PasteSpecial xlPasteValues Cells(1).Select Application.CutCopyMode = False ------------------------------------------------------ Dim OutApp As Outlook.Application Dim OutMail As Outlook.MailItem strdate = Format(Now, "mm-dd-yy") Application.DisplayAlerts = False Dim wb As Workbook Sheets(Array("OCC")).Copy Set wb = ActiveWorkbook wb.SaveAs Filename:="C:\The DK Global Group\Excel\Ori Billing\Occ\OCC Fills " & Format(Date, "mm-dd-yy") & ".xls" wb.Close False Application.DisplayAlerts = Tru -- sungen9 ----------------------------------------------------------------------- sungen99's Profile: http://www.excelforum.com/member.php...nfo&userid=914 View this thread: http://www.excelforum.com/showthread.php?threadid=26901 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving a worksheet with links
A copy/Paste example <g
Sub Mail_OneSheet_Outlook() 'You must add a reference to the Microsoft outlook Library Dim OutApp As Outlook.Application Dim OutMail As Outlook.MailItem Dim wb As Workbook Dim strdate As String strdate = Format(Now, "dd-mm-yy h-mm-ss") Application.ScreenUpdating = False Sheets("OCC").Copy Cells.Copy Cells.PasteSpecial xlPasteValues Cells(1).Select Application.CutCopyMode = False Set wb = ActiveWorkbook With wb .SaveAs "C:\The DK Global Group\Excel\OrixBilling\Occ\OCC Fills" _ & " " & strdate & ".xls" Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(olMailItem) With OutMail .To = " .CC = "" .BCC = "" .Subject = "This is the Subject line" .Body = "Hi there" .Attachments.Add wb.FullName .Send 'or use .Display End With .ChangeFileAccess xlReadOnly Kill .FullName ' delete the file you send .Close False End With Application.ScreenUpdating = True Set OutMail = Nothing Set OutApp = Nothing End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "sungen99" wrote in message ... Thanks so much Ron for your help. Please understand however that as far as programing goes I'm just a hack now. Just good at copying and slightly modifiing code. Bellow is the part of my code that saves the file. I honestly do not know how to modifiy using your additional. Thanks so much again for your contuned help. Sh.Copy ActiveSheet.Copy Cells.Copy Cells.PasteSpecial xlPasteValues Cells(1).Select Application.CutCopyMode = False ------------------------------------------------------ Dim OutApp As Outlook.Application Dim OutMail As Outlook.MailItem strdate = Format(Now, "mm-dd-yy") Application.DisplayAlerts = False Dim wb As Workbook Sheets(Array("OCC")).Copy Set wb = ActiveWorkbook wb.SaveAs Filename:="C:\The DK Global Group\Excel\Orix Billing\Occ\OCC Fills " & Format(Date, "mm-dd-yy") & ".xls" wb.Close False Application.DisplayAlerts = True -- sungen99 ------------------------------------------------------------------------ sungen99's Profile: http://www.excelforum.com/member.php...fo&userid=9144 View this thread: http://www.excelforum.com/showthread...hreadid=269010 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Links Not saving? | Excel Discussion (Misc queries) | |||
Problems saving a worksheet with links | Links and Linking in Excel | |||
Problems saving a worksheet with links to a New Location | Excel Worksheet Functions | |||
Problems saving a worksheet with links | Excel Discussion (Misc queries) | |||
Saving a worksheet with links | Excel Programming |