- Katılım
- 2 Mart 2011
- Mesajlar
- 120
- Excel Vers. ve Dili
-
İşyerinnde Excel 2003
Evde Excel 2010
Herkese Merhaba,
bu kod excel 2003 de çalışıyor ama excel 2010 da hata veriyor. debug diye uyarı veriyor tıkladığımda kırmızı ile işaretlidiğim satırda sarı işaret oluyor hata olduğu için. sorun nedir çözebilecek varmı acaba..
Kod:
Sub FARKLI_KAYDET()
Dim Dosya_Yolu, Dosya_Adı, ds
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Set Dosya_Adı = Sheets("PRO.HZ").Range("C7")
Dosya_Yolu = "\\Erguven01\C\KREDİ EVRAKLARI"
Set ds = CreateObject("Scripting.FileSystemObject")
X = Dosya_Yolu & "\" & Dosya_Adı
a = ds.FolderExists(X)
If a <> True Then
ds.CreateFolder X
End If
If Len(Dosya_Yolu) <= 3 Then Dosya_Yolu = Replace(Dosya_Yolu, "\", "")
Sheets(Array("PRO", "Kredi Değ.", "ÖZKAYNAK", "TRM.KRD", "KEFİL")).Copy
[COLOR="Red"]ActiveWorkbook.SaveAs Filename:="" & X & "\" & Dosya_Adı & " .xls", FileFormat:=xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False
ActiveWorkbook.Close[/COLOR]
MsgBox Dosya_Yolu & "\" & Dosya_Adı & ".xls" & " Dosya kayıt edildi"
Application.ScreenUpdating = True
Application.DisplayAlerts = True
End Sub