Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
mju mju is offline
external usenet poster
 
Posts: 29
Default Please help! Database lookup from excel

I am trying to write a VBA program that will ask user to enter the company's
name in an input box.
it will then lookup an Access database to find matching company's name to
return company's ID.
ID number will be returned in an Excel spreadsheet in cell B1.Company's name
will be in cell A1.

Before Search:
Company 's name ID_Num
macy 's

After Search:

Company 's Name ID_num
macy 's 123
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Please help! Database lookup from excel

jThe best way is first ot manual do the operation while record a macro and
then modify the record macro as required.


1) From worksheet menu start recording macro - Tool - Macro Record New Macro
2) Perform the query from Data - Import External Data - New Database query.
Select the database file. then select the two Company and ID.

3) If yo can't modify the code yourself post the code so it can be modified.

"mju" wrote:

I am trying to write a VBA program that will ask user to enter the company's
name in an input box.
it will then lookup an Access database to find matching company's name to
return company's ID.
ID number will be returned in an Excel spreadsheet in cell B1.Company's name
will be in cell A1.

Before Search:
Company 's name ID_Num
macy 's

After Search:

Company 's Name ID_num
macy 's 123

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
Create Database Type Lookup In Excel powlaz Excel Discussion (Misc queries) 4 December 15th 09 08:31 PM
Database Lookup Modawg Excel Worksheet Functions 2 August 25th 09 01:24 PM
lookup database ellebelle Excel Worksheet Functions 3 October 13th 08 09:17 AM
Lookup In Excel from Access Database ca1358 Excel Programming 0 January 27th 06 04:07 PM
Database Lookup Raymond Gallegos Excel Worksheet Functions 1 December 22nd 04 01:44 AM


All times are GMT +1. The time now is 05:39 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"