View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
akkurup[_3_] akkurup[_3_] is offline
external usenet poster
 
Posts: 1
Default Dynamic Controls (CheckBox) using VBA in Excel


Hi Bob,

Here's the Code
In Here Iam Show the data in Column B and C.
I want to Provide a Checkbox In Column "A" for each row
I am Using Oracle OO4O driver for connecting to the database and
reterieve the data.


Sub Reterieve_data()
Dim strSQL As String
Dim strResult As String
Dim OraDynaSet As Object
Dim i As Integer
strSQL = "select ename, empno from emp"
Set OraDynaSet = objDataBase.DBCreateDynaset(strSQL, 0&)
If OraDynaSet.RecordCount 0 Then
'There were records retrieved
OraDynaSet.MoveFirst
For i = 1 To OraDynaSet.RecordCount
ActiveSheet.Cells(i, 2) = OraDynaSet.Fields(0).Value
ActiveSheet.Cells(i, 3) = OraDynaSet.Fields(1).Value
OraDynaSet.MoveNext
Next i
End If
End Sub


--
akkurup
------------------------------------------------------------------------
akkurup's Profile: http://www.excelforum.com/member.php...o&userid=28316
View this thread: http://www.excelforum.com/showthread...hreadid=479030