Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 121
Default VBA Code - Excel & Access

I am trying to create a code in an Excel workbook that when I run the macro
it will perform the following functions in the following sequence.

1. Open an Access Database called Asset
2. Copy each record (126 total) from the table called Product Information
3. Create a new worksheet for each record and paste the contents in cells
B2:B11

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default VBA Code - Excel & Access

hi
see this site. you may have to modify some.
http://www.vbaexpress.com/kb/getarticle.php?kb_id=889

regards
FSt1

"Workbook" wrote:

I am trying to create a code in an Excel workbook that when I run the macro
it will perform the following functions in the following sequence.

1. Open an Access Database called Asset
2. Copy each record (126 total) from the table called Product Information
3. Create a new worksheet for each record and paste the contents in cells
B2:B11

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default VBA Code - Excel & Access

What I rec ommmend is to get everything from acess and put the data into one
worksheet and then split the sheet into 126 new worksheets.

To get the data from Access I would record a macro while doing the operation
manually. Then modify the recorded Macro as required.

1) To Record Macro from worksheet menu - Tools - Macro - Record new Macro
2) Get data from Access use worksheet menu - Data - Import External Data -
New Data Base Query - MS Access database - Press Ok. Then select file and
Press OK. Select options as required.


After you get the code you can post the code so it can be modified. Each
record should be one row on the spreadsheet so it will be easy to create a
new worksheet for each row. The macro can be written to format and move the
data as required.

"Workbook" wrote:

I am trying to create a code in an Excel workbook that when I run the macro
it will perform the following functions in the following sequence.

1. Open an Access Database called Asset
2. Copy each record (126 total) from the table called Product Information
3. Create a new worksheet for each record and paste the contents in cells
B2:B11

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
Run Excel VBA code inside Access [email protected] Excel Discussion (Misc queries) 1 November 18th 06 01:27 AM
Excel code convert to Access code - Concat & eliminate duplicates italia Excel Programming 1 September 12th 06 12:14 AM
Hyperlink in access from excel code JCanyoneer Excel Programming 1 July 6th 06 09:07 PM
Using Access in Excel VB Code Michael Excel Discussion (Misc queries) 1 February 2nd 06 07:31 PM
Is there somewhere I can access Excel-VB code at once? Souljah[_3_] Excel Programming 1 April 29th 04 03:46 PM


All times are GMT +1. The time now is 09:18 PM.

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"