- Katılım
- 4 Haziran 2008
- Mesajlar
- 798
- Excel Vers. ve Dili
- Excel 2021 TÜRKÇE
Arkadaşlar Merhaba; yukarıdaki Excel makrosu normal olarak çalışıyor, benim istediğim küçük bir değişiklik mavi satıra kadar makronun çalışması ;mavi satırda yazılı olan Dosya ismi sürekli değişiyor.Bu ismi TARGET.xlsm dosyasında E2 hücresine yazdığımda aktif olması ve makronun geri kalanının çalışmaya devam etmesi
İlginiz için şimdiden teşekkür eder iyi hafta sonları dilerim
Açıklama dosyası ve makro ektedir...
Sub XC()
Windows("AS.xla").Activate
Range("A1:AT403").Select
Selection.Copy
Windows("20170210.xlsx").Activate
Sheets("Sayfa2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
Selection.Copy
Windows("TARGET.xlsm").Activate
Sheets("R").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Windows("ALERTER.xlsm").Activate
Sheets("R").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("ANA SAYFA").Select
Range("D2").Select
Windows("TARGET.xlsm").Activate
Sheets("ANA SAYFA").Select
Range("E3").Select
End Sub
İlginiz için şimdiden teşekkür eder iyi hafta sonları dilerim
Açıklama dosyası ve makro ektedir...
Sub XC()
Windows("AS.xla").Activate
Range("A1:AT403").Select
Selection.Copy
Windows("20170210.xlsx").Activate
Sheets("Sayfa2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
Selection.Copy
Windows("TARGET.xlsm").Activate
Sheets("R").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Windows("ALERTER.xlsm").Activate
Sheets("R").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("ANA SAYFA").Select
Range("D2").Select
Windows("TARGET.xlsm").Activate
Sheets("ANA SAYFA").Select
Range("E3").Select
End Sub
