Microsoft Office Excel ® Kod Kılavuzu

Microsoft Office Excel® Code Guide

10 Eylül 2009 Perşembe

Column Data Transfer






'UserForm1
'AddTools on UserForm1: ListBox1, CommandButton1, Label1
Option Explicit
Dim i, Temp As Single
Dim Kaynak, Hedef As Double
Dim MyArray(6, 3)

Private Sub UserForm_Initialize()

On Error Resume Next
Me.Caption = "[PBİD®] Liste kolonlarının yerini değiştirmek.."
ListBox1.ColumnCount = 3
For i = 0 To 5


MyArray(i, 0) = i
MyArray(i, 1) = Rnd
MyArray(i, 2) = Rnd


Next i
ListBox1.List() = MyArray
Application.Visible = False
End Sub

Private Sub CommandButton1_Click()

On Error Resume Next
For i = 0 To 5


Temp = ListBox1.List(i, 0)
ListBox1.List(i, 0) = ListBox1.List(i, 2)
ListBox1.List(i, 2) = Temp


Next i
End Sub

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)

On Error Resume Next
Application.Visible = True
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