![]() |
#3
|
|||
|
|||
![]()
Thank you so much!
Unfortunately, I can't get the rest of it to work either. I suppose it may be outdated but a couple of things don't seem right to me. -I changed 'listbox1' to 'combobox1' since that's what i'm using -If i'm not supposed to be referring to DAO when in Excel 2007 then is this correct? -I get runtime error 3170 - 'could not find installable ISAM Private Sub UserForm_Initialize() Dim db As DAO.Database Dim rs As DAO.Recordset Dim NoOfRecords As Long Set db = OpenDatabase("U:\TPCentral_Too\PE_GC_list.xls", False, False, "Excel 12.0") Set rs = db.OpenRecordset("SELECT * FROM 'PEdatabase'") With rs .MoveLast NoOfRecords = .RecordCount .MoveFirst End With ComboBox1.ColumnCount = rs.Fields.Count ComboBox1.Column = rs.GetRows(NoOfRecords) rs.Close db.Close Set rs = Nothing Set db = Nothing End Sub |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
SDondeti | Word VBA | 10 | 05-10-2018 03:52 PM |
Excel - move with tab through named range | mjlaw | Excel | 4 | 03-26-2012 10:40 AM |
Searchable list in excel? | leahca | Excel | 7 | 11-24-2011 04:44 AM |
PowerPoint Add-in fails to load in start up but loads successfully if load manually f | shahbazlibra | PowerPoint | 0 | 11-30-2010 08:36 AM |
Through VBA, export range from Excel to Word | duugg | Word VBA | 0 | 08-24-2009 07:50 PM |