Raporda Kod hatası alıyorum.

Katılım
16 Şubat 2007
Mesajlar
323
Excel Vers. ve Dili
office 2003 prof.tr
Arkadaşlar merhaba,
Daha önce yine forumdaki çözümlerden istifade ederek raporda metin alanlarının çizgilerinin gösterilmesi ile ilgili olarak aldığım kodu bir başka çalışmamda daha kullanmak istediğimde ekte gönderdiğim kod hatası ile karşılaştım.
acaba problem ne olabilir.
Not : rapordaki bahsi geçen "MakeBoxesGrow" (Aşağıdaki gibi) ile ilgili kod modüller bölümünde kayıtlı.

Public Sub MakeBoxesGrow(ThisReport As Report)
Dim X1 As Single
Dim X2 As Single
Dim Y1 As Single
Dim Y2 As Single
Dim Offset As Single
Dim Color As Long
Dim ThisControl As Control
Dim MaxHeight As Single

For Each ThisControl In ThisReport.Section(acDetail).Controls
If ThisControl.Visible = True Then
If ThisControl.Height > MaxHeight Then
MaxHeight = ThisControl.Height
End If
End If
Next ThisControl

ThisReport.ScaleMode = 1

Offset = 0
ThisReport.DrawWidth = 3
Color = RGB(0, 0, 0) '

For Each ThisControl In ThisReport.Section(acDetail).Controls
If ThisControl.Visible = True Then

X1 = ThisControl.Left - Offset
Y1 = ThisControl.Top - Offset

X2 = ThisControl.Left + ThisControl.Width + Offset
Y2 = ThisControl.Top + MaxHeight + Offset

ThisReport.Line (X1, Y1)-(X2, Y2), Color, B
End If
Next ThisControl

Set ThisControl = Nothing
End Sub
 

Ekli dosyalar

Katılım
25 Aralık 2005
Mesajlar
4,160
Excel Vers. ve Dili
MS Office 2010 Pro Türkçe
Satırın başına Call ekleyerek deneyin.
 
Katılım
16 Şubat 2007
Mesajlar
323
Excel Vers. ve Dili
office 2003 prof.tr
Sayın modalı,
çok teşekkür ederim. problem halloldu.
 
Üst