Microsoft Office Excel ® Kod Kılavuzu

Microsoft Office Excel® Code Guide

10 Eylül 2006 Pazar

Choose Dim DBase


'UserForm1

Option Explicit
Dim Alan
Dim Aranan
Dim i As Long

Private Sub ListBox1_Click()
On Error Resume Next
TextBox1.Text = ListBox1.List(ListBox1.ListIndex, 0)
End Sub
Private Sub TextBox1_Change()
On Error Resume Next
Aranan = TextBox1.Text
Label1.Caption = Application.VLookup(Aranan, Alan, 2, False)
Label2.Caption = Application.VLookup(Aranan, Alan, 3, False)
Label3.Caption = Application.VLookup(Aranan, Alan, 4, False)
End Sub
Private Sub UserForm_Initialize()
On Error Resume Next
ReDim Alan1(10000, 4)
For i = 0 To (10000 - 1)
Alan1(i, 0) = "Adı" & (i + 1)
Alan1(i, 1) = "Soyadı" & (i + 1)
Alan1(i, 2) = "Yaşı" & (i + 1)
Alan1(i, 3) = "Okulu" & (i + 1)
Next i
ListBox1.List() = Alan1
Alan = Alan1
End Sub

Hiç yorum yok:

Blog Arşivi

Bu gadget'ta bir hata oluştu

Bu Blogda Ara

Contributor

Contributor
Mustafa ULUSARAÇ İstanbul, TÜRKİYE
free counters
T. C. Central Bank Indicative Exchange Rates
Currency Exchange Rate Widget,Currency Converter Widget
Borsa İstanbul