Hi Deepblerg
I do it like this.
Adodc1 is a adodc datacontrol connected to a database.
The datagrid is set like this:
Set Datagrid1.DataSource = Adodc1
Than you can sort every column in a wanted direction up or down like this:
With Adodc1.Recordset
.Sort = .Fields(ColChosen).Name & "...
Consider this piece of code(vb6)
Dim bWasntRunning As Boolean 'Excel already running
Dim Excel As Object 'Excel-object
Private Sub Yourbutton_Click()
Dim ExcelSheet As Object
' ---------------------------------------------------
'Start Excel if not running.
'...
You have to work around that. f.e. make a string of the double with str(x) with x as double. Then find the string behind the decimal point. Test that number and do whatever you like, f.e. if number<5 (when using 1 decimal) then x=x+1 and use round(x). 8.3 will become 9.
To my knowledge there is...
You can simulate Drag&Drop by using a label. When you mouse_down a cell you copy the content of the cell to the label. Then you drag the label around(label.drag 1). The problem is that when you let go(on the grid) the dragdrop event occurs and you have only the source(label) and the position...
Please check the VB6 CD.
In the directory \common\Tools\vb\Controls is a readme.txt who will explain everything. I did the same, because I also removed the old VB-version.
Good Lucky, ICET
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.