• DİKKAT

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

güne göre form

Katılım
13 Temmuz 2005
Mesajlar
134
Excel Vers. ve Dili
ofis xp, 2003
arkadaslar auto_open macrosunda ;mesala buğün pazartesi ise 1.form ,salı ise 2.form,şarşamba ise 3.form ile açılmasını nasıl sağlarız.tşk
 
Kod:
Private Sub Workbook_Open()
bugun = Weekday(Date)
Select Case bugun
Case 1
MsgBox "pzr"
Case 2
MsgBox "pzt"
Case 3
MsgBox "sal"
Case 4
MsgBox "çrş"
Case 5
MsgBox "per"
Case 6
MsgBox "cuma"
Case 7
MsgBox "cts"
End Select
End Sub

mesajbox'lar yerine formlarınızı çağırabilirsiniz.
 
Aşağıdaki kodu deneyin.

[vb:1:28533f72f7]Sub auto_open()
a = Weekday(Date, vbMonday)
If a = 1 Then UserForm1.Show
If a = 2 Then UserForm2.Show
If a = 3 Then UserForm3.Show
End Sub
[/vb:1:28533f72f7]

Not:Ersin beyin kodu daha iyi onu tercih ediniz. Case komutu daha kullanışlı olacaktır.
 
solun teşkürler ...
 
Geri
Üst