• DİKKAT

    DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
    Altın Üyelik Hakkında Bilgi

farklı kaydet

muhsar

Altın Üye
Katılım
16 Mart 2019
Mesajlar
281
Excel Vers. ve Dili
2010 tütkçe
Kod:
Sub FormulaConvert()
'Formulleri Değere çevirir
    Selection.Copy
    Selection.PasteSpecial Paste:=xlPasteValues, _
     Operation:=xlNone, SkipBlanks:=False, Transpose:=False
    Application.CutCopyMode = False
End Sub

yukardıda formül ile seçili alanı formülsüz olarak kayıt yapıyorum

Kod:
Sub file_date_save()
Dim filePath As String
Application.EnableEvents = False
Application.DisplayAlerts = False
filePath = CreateObject("WScript.Shell").SpecialFolders("Desktop") & Application.PathSeparator
ThisWorkbook.SaveAs filePath & Format(Date, "dd-mm-yyyy") & ".xlsm", FileFormat:=52
Application.EnableEvents = True
Application.DisplayAlerts = True
End Sub

bu kod ilede sayfayı masa üstüne farklı kayıt ediyorum


benim yapmak istediğim ;
içinde bulunduğum çalışma kitabını benim gösterdiğim yol a (F:\EVDE SAĞLIK\yedekler)formülsüz olarak günün tarihinden ismini alarak farklı kaydet yapmak

yukarıdaki formülleri nasıl birleştirip istediğimi sağlayabilirim.teşekkürler
 
Merhaba.
Şu satır masaüstü klasörünü seçiyor.

Kod:
filePath = CreateObject("WScript.Shell").SpecialFolders("Desktop") & Application.PathSeparator

onun yerine şu satırı kopyalayın.

Kod:
filePath = "F:\EVDE SAĞLIK\yedekler\"
 
Merhaba.
Şu satır masaüstü klasörünü seçiyor.

Kod:
filePath = CreateObject("WScript.Shell").SpecialFolders("Desktop") & Application.PathSeparator

onun yerine şu satırı kopyalayın.

Kod:
filePath = "F:\EVDE SAĞLIK\yedekler\"

hocam makroyu birleştirip çalıştırdım farklı kaydet ve yol olayı tamam fakat formülleri ile kopyaladı,sebebi ilk kod çalışmadı çünkü seçili alan yok,bu çalışma kitabının tamamını seç kısmını ilk formüle nasıl ilave edebilirim



Kod:
Sub FormulaConvert()
'Formulleri Değere çevirir
    Selection.Copy
    Selection.PasteSpecial Paste:=xlPasteValues, _
     Operation:=xlNone, SkipBlanks:=False, Transpose:=False
    Application.CutCopyMode = False
Dim filePath As String
Application.EnableEvents = False
Application.DisplayAlerts = False
filePath = "F:\EVDE SAĞLIK\yedekler\"
ThisWorkbook.SaveAs filePath & Format(Date, "dd-mm-yyyy") & ".xlsm", FileFormat:=52
Application.EnableEvents = True
Application.DisplayAlerts = True
End Sub


yukarıdaki şekilde kullandım formülü
 
Şöyle olacak.

Kod:
Sub FormulaConvert()
'Formulleri Değere çevirir
Cells.Copy
Cells.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Dim filePath As String
Application.EnableEvents = False
Application.DisplayAlerts = False
filePath = "F:\EVDE SAĞLIK\yedekler\"
ThisWorkbook.SaveAs filePath & Format(Date, "dd-mm-yyyy") & ".xlsm", FileFormat:=52
Application.EnableEvents = True
Application.DisplayAlerts = True
End Sub
 
Şöyle olacak.

Kod:
Sub FormulaConvert()
'Formulleri Değere çevirir
Cells.Copy
Cells.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Dim filePath As String
Application.EnableEvents = False
Application.DisplayAlerts = False
filePath = "F:\EVDE SAĞLIK\yedekler\"
ThisWorkbook.SaveAs filePath & Format(Date, "dd-mm-yyyy") & ".xlsm", FileFormat:=52
Application.EnableEvents = True
Application.DisplayAlerts = True
End Sub

hocam ilginiz için çok teşekkür ederim ;tek sorunum kaldı içinde bulunduğum sayfayı seçip değere çeviriyor,ben tüm çalışma kitabını yani diğer sayfalarıda seçip onlarıda formülleri değere çevirerek farklı kaydetmek istiyorum,

kısaca çalışma kitabındaki tüm sayfalara ilk formülü uygula kısmını ilave ederseniz çok sevinirim tekrar teşekkürler
 
Kod:
Sub FormulaConvert()
    Dim syf As Worksheet
    Dim filePath As String
    For Each syf In ThisWorkbook.Worksheets
        syf.Cells.Copy
        syf.Cells.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
    Next
    Application.CutCopyMode = False
    Application.EnableEvents = False
    Application.DisplayAlerts = False
    filePath = "F:\EVDE SAĞLIK\yedekler\"
    ThisWorkbook.SaveAs filePath & Format(Date, "dd-mm-yyyy") & ".xlsm", FileFormat:=52
    Application.EnableEvents = True
    Application.DisplayAlerts = True
End Sub
 
Kod:
Sub FormulaConvert()
    Dim syf As Worksheet
    Dim filePath As String
    For Each syf In ThisWorkbook.Worksheets
        syf.Cells.Copy
        syf.Cells.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
    Next
    Application.CutCopyMode = False
    Application.EnableEvents = False
    Application.DisplayAlerts = False
    filePath = "F:\EVDE SAĞLIK\yedekler\"
    ThisWorkbook.SaveAs filePath & Format(Date, "dd-mm-yyyy") & ".xlsm", FileFormat:=52
    Application.EnableEvents = True
    Application.DisplayAlerts = True
End Sub

çok teşekkür ederim,elinize sağlık
 
Geri
Üst