Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Links Not saving? Ty Archer Excel Discussion (Misc queries) 1 March 15th 07 09:49 AM
Problems saving a worksheet with links Links and Linking in Excel 1 July 9th 06 12:25 AM
Problems saving a worksheet with links to a New Location Excel Worksheet Functions 1 July 7th 06 05:09 PM
Problems saving a worksheet with links Excel Discussion (Misc queries) 1 July 7th 06 04:49 PM
Saving a worksheet with links sungen99[_15_] Excel Programming 1 October 13th 04 08:37 PM


All times are GMT +1. The time now is 08:44 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"