Kodu acaba nasıl yazabilirim hata alıyorumda

Katılım
9 Eylül 2007
Mesajlar
65
Excel Vers. ve Dili
excel 2007
Merhaba, excel de kullandığım makroma bir eklenti yapmak istiyordum ama hata alıyorum kod şöyle ;

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim z As String
If Intersect(Target, [A:B]) Is Nothing Then Exit Sub
If UCase(Target.Value) = "KOP - 99" Then
z = Application.PathSeparator
Shell "C:" & z & "windows" & z & "system32" & z & "mstsc.exe /v 90.90.90.90", vbNormalFocus
End If

..................
..................

End Sub

_________________________________________________________

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not IsEmpty(Target) Then
Set BUL = Sheets("Sayfa2").Cells.Find(Target)
If Not BUL Is Nothing Then
Sheets("Sayfa2").Select
Sheets("Sayfa2").Range("" & BUL.Address).Select
Set BUL = Nothing
End If
End If
End Sub

bu şekilde kullanmak istiyorum aynı safada yazılı bu kod sorun lu kod Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) burası tahminim iki defa kullanıyorum diye ama ne yapabilirim acaba... teşekkürler
 

hamitcan

Uzman
Uzman
Katılım
1 Temmuz 2004
Mesajlar
7,680
Excel Vers. ve Dili
Excel 2019 Türkçe
İki kodu birleştirmelisiniz.
 
Katılım
9 Eylül 2007
Mesajlar
65
Excel Vers. ve Dili
excel 2007
Bu konuda çok iyi değilimde bir örnek göstere bilirseniz...
 
Üst