Microsoft Access
Linking to Excel and Word exercise
Average difficulty

This Microsoft Access LINKING TO EXCEL AND WORD exercise is provided to allow potential course delegates to assess their suitability for the Wise Owl ACCESS VISUAL BASIC course only, and may not be reproduced in whole or in part in any format without the prior written consent of Wise Owl.

Exercise: Talking to Excel

A full answer to this exercise is provided as part of the training course!

1) Download the files needed to start this exercise: exercise-266.zip (and click here if you experience any problems unzipping this file after downloading it).
2) Create a macro to copy the names of all players, their teams and the number of goals they've scored into a new Excel spreadsheet.  Use the hints below as a guide:
  • Create a query to list each player name, his team and his goal tally.
  • Create a variable to represent Excel, say XL.
  • To create a workbook use: XL.Workbooks.Add
  • To put a value in the current cell use: XL.ActiveCell =
  • To move the current cell down one row use: XL.ActiveCell.Offset(1,0).Select
  • To put a value in a cell one column to the right of the current cell use: XL.ActiveCell.Offset(0,1) =

Thank you for showing an interest in this Access Visual Basic training course! As mentioned above, full answers to this and other exercises are provided on the course. On all Wise Owl scheduled courses delegates can take away these model answers (together with their own efforts!) on a free USB stick.

All content � Wise Owl Business Solutions Ltd 2007.  All rights reserved.  Design by Branches.