• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Moved Filed into new excel but only pastevalues with formatting

Mohammad Shafaat

New Member
Code:
ActiveWorkbook.RefreshAll
Worksheets(Array("Team_Wise", "XYZA_Performance", "Channel", "XYZ_NORMAL", "Controlled", "Source")).Copy
With ActiveWorkbook
     .SaveAs Filename:="E:\Automation\New folder\IVR\" & "UPE_xyz_Performance.xlsx", FileFormat:=51
     ActiveWorkbook.Sheets("Source").Visible = xlSheetVeryHidden
     .Close savechanges:=True
         Application.DisplayAlerts = False
 
Last edited by a moderator:

Mohammad Shafaat

New Member
Mohammad Shafaat
You have sent a part of code to 'Ask an Excel Question' - Forum ... ( moved to correct Forum)
What was Your idea of this thread?
Thankyou Sir For your Kind response my motive is i want to send the file thru mail but main souRCE file having caluculated thru formula i want to send file with paste special values only
 

vletm

Excel Ninja
Mohammad Shafaat
#1 reply) You're writing something ...
#1 reply) Your code could do something ...
#3 reply) You're writing ... something different ...
Could You sit down for few seconds and try to figure What are You going to do?
After above ... You could write that here.
 

Mohammad Shafaat

New Member
Hi, sir as per the vb code we send this file with saves as some required sheet on another folder and added snapshot on the email body along with the saveas attachment.
the issue is that saves as a file having a with a formula which is required paste values and formatting only, so please help me on this error I'm not expertise in VBA Thankyou. Sir once again.

Here we shared you a sample VB code please do the necessary changes in VB code :
Code:
Option Explicit

Sub Send_Email_With_snapshot()
Dim sh As Worksheet
Set sh = ThisWorkbook.Sheets("Summary")
ActiveWorkbook.RefreshAll
Worksheets(Array("Calculation", "Ret", "TEAM Wise", "Channel_Base")).Copy
With ActiveWorkbook
     .SaveAs Filename:="E:\Automation\New folder\" & "RAEO_Dashboard_MTD.xlsx", FileFormat:=51
     .Close savechanges:=True
         Application.DisplayAlerts = False
Dim lr As Integer

lr = sh.Range("A" & Application.Rows.Count).End(xlUp).Row

sh.Range("A1:U120").Select

With Selection.Parent.MailEnvelope.Item
    .to = "xyz@gmail.com"
    .cc = ""
    .Subject = sh.Range("AN14").Value
    .attachments.Add "E:\Automation\New folder\RAEO_Dashboard_MTD.xlsx"
    .send
   
End With
Application.DisplayAlerts = False
ThisWorkbook.Save
Application.DisplayAlerts = True
End With
End Sub
 
Last edited by a moderator:

Mohammad Shafaat

New Member
Sorry for wasting your preciuos time Sir
.
Sir please find the enclosed Code

Third time same code without code -tags!
 
Last edited by a moderator:

Mohammad Shafaat

New Member
Can we pastevalues & formatting only in save as file which is saved by given below code :

Fourth time same code without code -tags!
 
Last edited by a moderator:
Top