aşağıdaki kod ile sayfaları kaydetmek istiyorum ama çalıştırınca şayet r5 te y yazmıyorsa kendini kapatıyor. yardımlarınız için şimdiden teşekkür ederim
yol = ThisWorkbook.Path
GR = [style!R4]
tarih = [style!m30]
Application.ScreenUpdating = True
Application.DisplayAlerts = False
If Range("gr").Value = "Y" Then
Sheets("BUY").COPY
ActiveWorkbook.SaveAs Filename:=yol & "\GER\" & GER & tarih & ".xls", FileFormat:=xlExcel8
End If
ActiveWorkbook.Close False
Application.ScreenUpdating = True
yol = ThisWorkbook.Path
ROMANIA = [style!R5]
tarih = [style!m30]
Application.ScreenUpdating = True
Application.DisplayAlerts = False
If Range("ro").Value = "Y" Then
Sheets("BUY").COPY
ActiveWorkbook.SaveAs Filename:=yol & "\RO\" & RO & tarih & ".xls", FileFormat:=xlExcel8
End If
ActiveWorkbook.Close False
Application.ScreenUpdating = True
yol = ThisWorkbook.Path
GR = [style!R4]
tarih = [style!m30]
Application.ScreenUpdating = True
Application.DisplayAlerts = False
If Range("gr").Value = "Y" Then
Sheets("BUY").COPY
ActiveWorkbook.SaveAs Filename:=yol & "\GER\" & GER & tarih & ".xls", FileFormat:=xlExcel8
End If
ActiveWorkbook.Close False
Application.ScreenUpdating = True
yol = ThisWorkbook.Path
ROMANIA = [style!R5]
tarih = [style!m30]
Application.ScreenUpdating = True
Application.DisplayAlerts = False
If Range("ro").Value = "Y" Then
Sheets("BUY").COPY
ActiveWorkbook.SaveAs Filename:=yol & "\RO\" & RO & tarih & ".xls", FileFormat:=xlExcel8
End If
ActiveWorkbook.Close False
Application.ScreenUpdating = True
