• DİKKAT

    DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
    Altın Üyelik Hakkında Bilgi

Makro kod çakışması

sinnernekolens

Altın Üye
Katılım
23 Temmuz 2009
Mesajlar
310
Excel Vers. ve Dili
Ofis 2019 - Türkçe 64bit
iyi günler arkadaşlar, aşağıdaki iki kodun çakışmasını nasıl engelleyebilirim? iki tane auto_open var. yardımlarınız rica olunur.

Hata mesajı: Ambiguous name detected: auto_open

Public sonSayfa As String
Sub auto_open()
Application.OnKey "%q", "xxx"
End Sub
Sub xxx()
If sonSayfa = "" Then Exit Sub
Sheets(sonSayfa).Select
End Sub
*************************
Sub auto_open()
Application.OnKey "{F9}", "Aç"
End Sub
Sub Auto_Close()
Application.OnKey "{F9}", ""
End Sub
Sub Aç()
UserForm1.Show 0
End Sub
 
Son düzenleme:
auto_open kodlarını aşağıdaki gibi alt alta yazsanız olmuyor mu?

Kod:
Public sonSayfa As String
Sub auto_open()
    Application.OnKey "%q", "xxx"
    Application.OnKey "{F9}", "Aç"
End Sub

Sub Auto_Close()
    Application.OnKey "{F9}", ""
End Sub

Sub Aç()
    UserForm1.Show 0
End Sub

Sub xxx()
    If sonSayfa = "" Then Exit Sub
    Sheets(sonSayfa).Select
End Sub
 
Teşekkür ederim şimdi oldu.
 
Geri
Üst