EKREM1661
Altın Üye
		- Katılım
 - 10 Kasım 2006
 
- Mesajlar
 - 1,288
 
- Excel Vers. ve Dili
 - Excel-2016
 
- Altın Üyelik Bitiş Tarihi
 - 03-02-2026
 
Hocam esenlikler dileğiyle; aşağıda, belirli bir sayfa alanını yazım, çizim ve objelerden temizleyen makro satırlarının 
	
	
	
		
								Option Explicit altında çalışabilmesi için, Dim S1, Proceed, Alan, obj, xOK, yok As Variant bu şekilde variant değişkeni ile çalıştı ancak, ne kadar doğru ?
		Kod:
	
	Option Explicit
Private Sub CommandButton1_Click()
If Not Proceed = vbNo Then
With Range("A6:Z200")
    .Clear
    .NumberFormat = "General"
    .FormatConditions.Delete
    .Interior.ColorIndex = xlNone
End With
Set S1 = ActiveSheet
    S1.AutoFilterMode = False
Set Alan = S1.Range("A6:Z200")
For Each obj In S1.DrawingObjects
    If obj.Left <= Alan.Left + Alan.Width And obj.Left + obj.Width >= Alan.Left Then xOK = True Else xOK = False
    If obj.Top <= Alan.Top + Alan.Height And obj.Top + obj.Height >= Alan.Top Then yok = True Else yok = False
    If yok And xOK Then obj.Delete
Next
End If
End Sub
	
								
									Son düzenleme: 
								
							
						
						
	
					
				