Microsoft Office Versiyon kontrolü?

Katılım
12 Ocak 2009
Mesajlar
838
Excel Vers. ve Dili
2003
Merhaba arkadaşlar.
Sütun karşılaştırma amacıyla aşağıdaki kod bloğunu kullanmaktayım.
kod bloğunu *.xlsb formunda excel eklentisi olarak makinada yerleşik olarak kullanmaktayım.
excel kitabının versiyon bilgisine göre; ofis 2007 ve yukarısı ise kod bloğunda olan satır sayısının (65536) 1048576 olarak değiştirilmesi,
ofis 2003 ise kod bloğunda olan satır sayısının (1048576) 65536 olarak değiştirilmesini istiyorum.

Yardımlarınızı rica ediyorum.

Kod:
Private Sub CommandButton1_Click()
CommandButton1.Enabled = False
CommandButton2.Enabled = False
CommandButton1.Caption = "Çalışıyor"

TextBox1.Enabled = False
TextBox2.Enabled = False
TextBox3.Enabled = False
TextBox4.Enabled = False
TextBox5.Enabled = False


If TextBox1.Text <> "" And TextBox2.Text <> "" And TextBox3.Text <> "" Then

Dim yüzde As Integer
Dim son As Long

son = Range(TextBox1.Text & 65536).End(3).Row

For i = 2 To Range(TextBox1.Text & 65536).End(3).Row
yüzde = i / son * 100
Label6 = i & "/" & Range(TextBox1.Text & 65536).End(3).Row & " - " & yüzde & " %"
DoEvents
ara = Range(TextBox1.Text & i)
For k = 2 To Range(TextBox2.Text & 65536).End(3).Row
bul = Range(TextBox2.Text & k)
If ara <> "" Or bul <> "" Then
If TextBox4.Text <> "" Then
If ara = bul Then
Range(TextBox3.Text & i) = TextBox4.Text

Exit For

End If
Else
If ara = bul Then
Range(TextBox3.Text & i) = Range(TextBox5.Text & k)

Exit For

End If
End If
End If

Next k
Next i
Else
MsgBox "Tüm Alanları Doldurunuz.", vbCritical, "HATA"
End If
CommandButton1.Enabled = True
CommandButton2.Enabled = True
CommandButton1.Caption = "TAMAM"

TextBox1.Enabled = True
TextBox2.Enabled = True
TextBox3.Enabled = True
TextBox4.Enabled = True
TextBox5.Enabled = True

DoEvents
End Sub

Private Sub CommandButton2_Click()
Application.DisplayAlerts = True
SendKeys "{Break}", True
End Sub
 

Korhan Ayhan

Administrator
Yönetici
Admin
Katılım
15 Mart 2005
Mesajlar
41,325
Excel Vers. ve Dili
Microsoft 365 Tr-En 64 Bit
Merhaba,

İlgili sayısal değerlerin yerine aşağıdaki komutu yazarsanız versiyon sıkıntısı yaşamazsınız.

Kod:
Rows.Count
 
Üst