Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
code to parse a multi-colum multi-select listbox Jade Excel Programming 1 September 16th 08 03:47 PM
identifying multi-select items in a listbox JT Excel Programming 1 January 7th 08 09:14 PM
Listbox Multi Select MikeT Excel Programming 2 July 27th 06 08:25 PM
Multi-select listbox help! John[_60_] Excel Programming 3 October 9th 04 01:57 AM
multi select listbox Paul Mueller Excel Programming 2 June 10th 04 09:08 PM


All times are GMT +1. The time now is 02:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"