Import combobox data from Excel into access

uwlchemist

New Member
Joined
Aug 29, 2009
Messages
38
I have a routine that imports Excel data into an access form. It works great when the data is located in Cells. I decided to explor using comboboxes in excel to allow users to select data, and am not having a hard time importing that data into my access form. This is the typical code I use to import the data

frm.txtTargetRotationRate = XlSheet.Range("TargetRotationRate")

When I try the same thing using the combobox, I get an error saying thet the control does not exist...but it does (have checked everything multiple times)

frm.txtFilmTime = XlSheet.cmpFilmPersistency

How do I refer to the Excel combobox and the data within it?
 

Some videos you may like

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

SydneyGeek

MrExcel MVP
Joined
Aug 5, 2003
Messages
12,251
Does the combo have a linked cell (Forms control) or a Row Source (ActiveX control?)
If so, reference those cells to get the combo's data. If not, link the combos to cells...

Denis
 

uwlchemist

New Member
Joined
Aug 29, 2009
Messages
38
OK, that is what I had decided to do. It seems odd to me that you can't reference the value of the combobox, but you can the value of an individual cell.
 

Watch MrExcel Video

Forum statistics

Threads
1,118,936
Messages
5,575,110
Members
412,647
Latest member
daviduk001
Top