Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
ListBox multi select updating in database
Hi I am stumped-
I have a populated listbox that I need to be able to use to find my selections in a database and enter a defined date into the first empty cell in their row. I honestly have limited VBA experience but anything would help. Basically how do I edit/manipulate the selections from a listbox once I have them selected? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
ListBox multi select updating in database
Getting the data from the list box is the simpliest part of your task. All
you need to use is the .value property of the listbox. The hard part is doing the lookup in the database. I asume the databae is in an Access file? I would first do a query to read the databae befor trying to write to the database. Start by recording a macro (Tools - Macro - Record New Macro) and then manually do a query of the database (Data - Import External Data - New Database Query). To write to the database the best way is to open an access application useing get object Set obj = getobject("c:\temp\myDB.mdb") then you can use the recorded macro to help you find the objets you are looking for in the database. If you have problems, post you record macro. "M.Desmond" wrote: Hi I am stumped- I have a populated listbox that I need to be able to use to find my selections in a database and enter a defined date into the first empty cell in their row. I honestly have limited VBA experience but anything would help. Basically how do I edit/manipulate the selections from a listbox once I have them selected? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
ListBox multi select updating in database
Thanks for the reply-
The database is an excel sheet in a large workbook. I have the database stored as a named range if that makes any difference. I will still give your recommendation a go tho. Thnks again! "Joel" wrote: Getting the data from the list box is the simpliest part of your task. All you need to use is the .value property of the listbox. The hard part is doing the lookup in the database. I asume the databae is in an Access file? I would first do a query to read the databae befor trying to write to the database. Start by recording a macro (Tools - Macro - Record New Macro) and then manually do a query of the database (Data - Import External Data - New Database Query). To write to the database the best way is to open an access application useing get object Set obj = getobject("c:\temp\myDB.mdb") then you can use the recorded macro to help you find the objets you are looking for in the database. If you have problems, post you record macro. "M.Desmond" wrote: Hi I am stumped- I have a populated listbox that I need to be able to use to find my selections in a database and enter a defined date into the first empty cell in their row. I honestly have limited VBA experience but anything would help. Basically how do I edit/manipulate the selections from a listbox once I have them selected? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
code to parse a multi-colum multi-select listbox | Excel Programming | |||
identifying multi-select items in a listbox | Excel Programming | |||
Listbox Multi Select | Excel Programming | |||
Multi-select listbox help! | Excel Programming | |||
multi select listbox | Excel Programming |