Run-time error '424': Object required hatasını bir türlü çözemedim neden olabilir arkadaşlar?

Katılım
18 Ağustos 2009
Mesajlar
740
Excel Vers. ve Dili
Office Ev ve İş 2021 - Türkçe
Altın Üyelik Bitiş Tarihi
12-12-2024
Dim SAYFAADI, Txt, Yol As String

Private Sub Label1_Click()
Image1.Visible = False
Label1.Visible = False
End Sub

Private Sub Image1_Click()
Image1.Visible = False
Label1.Visible = False
End Sub


Private Sub CheckBox1_Click()
If CheckBox1.Value = False Then
Image1.Visible = False
Label1.Visible = False
End If
End Sub

Private Sub TextBox1_Change()

End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
If CheckBox1.Value = False Then Exit Sub

Yol = "C:\ORS\FOTO2008" + "\" + ActiveCell.Text + ".jpg"
'MsgBox VarType(ActiveCell.Text)


On Error GoTo line0
Image1.Picture = LoadPicture(Yol)
Image1.Top = ActiveCell.Top - Image1.Height
Image1.Left = ActiveCell.Left
Image1.Visible = True
Label1.Caption = ""
' Label1.Top = ActiveCell.Top - Label1.Height
Label1.Top = Image1.Top + Image1.Height - Label1.Height
Label1.Left = Image1.Left + Image1.Width
sez

Exit Sub

line0:
Image1.Visible = False
Image1.Picture = LoadPicture()
Label1.Visible = False
'-------------------------------------------
' sez
' Label1.Top = ActiveCell.Top - Label1.Height
' Label1.Left = ActiveCell.Left
'-------------------------------------------

End Sub

Sub sez()

SAYFAADI = TextBox1.Text '"13.02.2017"
Label1.BackColor = &HFFFF00 'Mavi
Txt = ActiveCell.Text
Label1.Visible = False

' ActiveCell.Column = 4 ise 1. vrd
' ActiveCell.Column = 6 ise 2.vrd
' ActiveCell.Column = 8 ise 3.vrd
' ActiveCell.Column = 10 ise Normal

On Error GoTo line1

For II = 5 To 175
SAYI = Trim(Sheets(SAYFAADI).Cells(II, 4))
If Txt = SAYI Then
Label1.Caption = "1"
Label1.Visible = True

If ActiveCell.Column = 6 Then
Label1.BackColor = &HFF& 'Kırmızı
Else
Label1.BackColor = &HFFFF00 'Mavi
End If

Exit Sub
End If
Next II

For II = 5 To 175
SAYI = Trim(Sheets(SAYFAADI).Cells(II, 6))
If Txt = SAYI Then
Label1.Caption = "2"
Label1.Visible = True
Exit Sub
End If
Next II

For II = 5 To 175
SAYI = Trim(Sheets(SAYFAADI).Cells(II, 8))
If Txt = SAYI Then
Label1.Caption = "3"
Label1.Visible = True
Exit Sub
End If
Next II

For II = 5 To 175
SAYI = Trim(Sheets(SAYFAADI).Cells(II, 10))
If Txt = SAYI Then
Label1.Caption = "N"
Label1.Visible = True
Exit Sub
End If
Next II


Exit Sub

line1:
Label1.Caption = "Tarih Hatalı"
Label1.Top = ActiveCell.Top - Label1.Height
Label1.Left = Image1.Left + Image1.Width
Label1.Visible = True
End Sub
 
Katılım
18 Ağustos 2009
Mesajlar
740
Excel Vers. ve Dili
Office Ev ve İş 2021 - Türkçe
Altın Üyelik Bitiş Tarihi
12-12-2024
If CheckBox1.Value = False Then Exit Sub

bu kısımda hata veriyor arkadaşlar
 
Üst