Re: Listbox column heads dont display
thanks rory, I dont think I will ever forget this one..
Re: Listbox column heads dont display
thanks rory, I dont think I will ever forget this one..
Hi everyone,
I am trying to diplay the first row as the column heads but instead listbox displays Column A, Column B etc. Probably it has an easy trick to do but I have been struggling for long.
Would you help me to verify what is wrong with the below code?
Thanks
OGZ
Re: Filter Named Range To Userform ListBox
Thanks Krishnakumar, very good piece of code for me..
Oguz
Re: rowsource definition with worksheet range
Thanks Krishnakumar, that helps
Re: double quote usage with Evaluate function
You are opening my vision vision.. thanks a lot..
Re: double quote usage with Evaluate function
Thanks Rob, great help! Especially the first one is very interesting. appreciate that.
Hi Everyone,
I had lots of help over years, so thanks to all contributers, I am trying to feed the forum back in these days;
Below small piece of code does not work, any idea?
thanks
neither this;
Re: How to run SQL SELECT from VBA and display the results in the simplest way
This code gets data from another excel file and put it into a userform which has a listbox "lisxbox1"; treat this as a starter not an expert code piece ..
[INDENT]
[INDENT]'define DataBase_FileLoc and DataBase_Filename, where you get the data (I use an excel file)
ConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source =" & ThisWorkbook.DataBase_FileLoc & ThisWorkbook.DataBase_Filename & ";Extended Properties=Excel 8.0;Persist Security Info=False"
Set oCn = New ADODB.Connection
oCn.ConnectionString = ConnString
oCn.Open
If SQLfrom <> "" Then SQLfrom = " WHERE " + SQLfrom
'SQLfrom has arguments like "WHERE XXX = 'YYY'"
'Data is the name of the excel sheet!!!
SQL = "Select no1, engine, module1, data, part_no, part_name, sender from [Data$]" & SQLfrom
Set oRS = New ADODB.Recordset
oRS.Source = SQL
oRS.ActiveConnection = oCn
oRS.Open
No_Records = False
If oRS.EOF Then
MsgBox "DEBUG: No records matching the filter!" & Chr(13) & "Either change or clear the filter!", vbOKOnly, "No Match Found"
No_Records = True
Else
With oRS
'Set .ActiveConnection = Nothing 'Disconnect the recordset.
k = .Fields.Count
'Populate the array with the whole recordset.
vaData = .GetRows
End With
End If
'array transpose
Dim X As Long, Y As Long, Xupper As Long, Yupper As Long
Dim tempArray As Variant
Xupper = UBound(vaData, 2)
Yupper = UBound(vaData, 1)
ReDim tempArray(Xupper, Yupper)
For X = 0 To Xupper
For Y = 0 To Yupper
tempArray(X, Y) = vaData(Y, X)
Next Y
Next X
TransposeDim = tempArray
With Data_Table.ListBox1
.Clear
.ColumnCount = k
.List = TransposeDim
.ListIndex = -1
End With
If No_Records Then Data_Table.ListBox1.Clear
[/INDENT]
Display More
[/INDENT]
Re: Progress meters on steriods !
Andy I love you too
Re: Non-activex Datepicker Calendar Control
Thanks.. appreciate it.