Generic selectors
Ακριβή αποτελέσματα
Αναζήτηση στους τίτλους
Αναζήτηση στο περιεχόμενο
Post Type Selectors
Αναζήτηση σε άρθρα
Αναζήτηση σε σελίδες
Φίλτρο ανά κατηγορία
.net
Css
jQuery
Linux
Microsoft Excel
PHP
Power BI
Prestashop
Projects
Software
SQL
T-Edit
Tips
Wordpress
Επιστήμες

Αποθήκευση των tabs σε διαφορετικό path με Macro

Microsoft Excel

Οι καρτέλες αποθηκεύονται ως αυτοτελή excel. Οι τιμές των κελιών τους αποθηκεύονται ως values.

 

Option Explicit

Public Sub MISCSV()

Dim wbkExport As Workbook
Dim shtToExport As Worksheet

Set shtToExport = ThisWorkbook.Worksheets("mis")
Set wbkExport = Application.Workbooks.Add
shtToExport.Copy Before:=wbkExport.Worksheets(wbkExport.Worksheets.Count)
Application.DisplayAlerts = False
Worksheets("mis").Cells.Copy
Worksheets("mis").Cells.PasteSpecial xlPasteValues
wbkExport.SaveAs Filename:="C:\MIS\mis.xlsx"
Application.DisplayAlerts = True
wbkExport.Close SaveChanges:=False

Set shtToExport = ThisWorkbook.Worksheets("PORTFOLIO STATISTICS")
Set wbkExport = Application.Workbooks.Add
shtToExport.Copy Before:=wbkExport.Worksheets(wbkExport.Worksheets.Count)
Application.DisplayAlerts = False
Worksheets("Portfolio Statistics").Cells.Copy
Worksheets("Portfolio Statistics").Cells.PasteSpecial xlPasteValues
wbkExport.SaveAs Filename:="C:\mis\PORTFOLIO STATISTICS.xlsx"
Application.DisplayAlerts = True
wbkExport.Close SaveChanges:=False

Set shtToExport = ThisWorkbook.Worksheets("DAILY REVAL")
Set wbkExport = Application.Workbooks.Add
shtToExport.Copy Before:=wbkExport.Worksheets(wbkExport.Worksheets.Count)
Application.DisplayAlerts = False
Worksheets("daily reval").Cells.Copy
Worksheets("daily reval").Cells.PasteSpecial xlPasteValues
wbkExport.SaveAs Filename:="C:\mis\DAILY REVAL.xlsx"
Application.DisplayAlerts = True
wbkExport.Close SaveChanges:=False

Set shtToExport = ThisWorkbook.Worksheets("PORTFOLIO BENCHMARK")
Set wbkExport = Application.Workbooks.Add
shtToExport.Copy Before:=wbkExport.Worksheets(wbkExport.Worksheets.Count)
Application.DisplayAlerts = False
Worksheets("PORTFOLIO BENCHMARK").Cells.Copy
Worksheets("PORTFOLIO BENCHMARK").Cells.PasteSpecial xlPasteValues
wbkExport.SaveAs Filename:="C:\mis\PORTFOLIO BENCHMARK.xlsx"
Application.DisplayAlerts = True
wbkExport.Close SaveChanges:=False

Set shtToExport = ThisWorkbook.Worksheets("SYNOLA")
Set wbkExport = Application.Workbooks.Add
shtToExport.Copy Before:=wbkExport.Worksheets(wbkExport.Worksheets.Count)
Application.DisplayAlerts = False
Worksheets("SYNOLA").Cells.Copy
Worksheets("SYNOLA").Cells.PasteSpecial xlPasteValues
wbkExport.SaveAs Filename:="C:\mis\SYNOLA.xlsx"
Application.DisplayAlerts = True
wbkExport.Close SaveChanges:=False


MsgBox "ALL DONE"
End Sub
Αφήστε μια απάντηση0