hi!
I was wondering if anyone could show me how the code to make a listbox.. The code I have in Excel VB is as shows... I want the function_code to be shown as a listbox!
I was wondering if anyone could show me how the code to make a listbox.. The code I have in Excel VB is as shows... I want the function_code to be shown as a listbox!
Code:
Sub Get_Category()
resrow = 3 'börjar vid cell 3,2
rescol = 2
Sheets("sheet1").Range("b2:j1000").ClearContents
OpenConnection ("RFC")
strQuery = "SELECT * FROM DESCRIPTIONS" 'DESCRIPTIONS = tabellnamn
Set rs = ConnRFC.Execute(strQuery)
Do Until rs.EOF
Sheets("sheet1").Cells(resrow, rescol).Value = rs("FUNCTION_CODE")
Sheets("sheet1").Cells(resrow, rescol + 1).Value = rs("DESCRIPTION")
resrow = resrow + 1
rs.MoveNext
Loop
KillConnection ("RFC")
End Sub