Microsoft Excel
Working with files exercise
Average difficulty

This Microsoft Excel WORKING WITH FILES exercise is provided to allow potential course delegates to assess their suitability for the Wise Owl EXCEL 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: Customising FileDialog box

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

1) Download the files needed to start this exercise: exercise-423.zip (and click here if you experience any problems unzipping this file after downloading it).
2) Create a macro to display a dialog box for choosing a file as follows:
Exercise screen-shot 660 Notes on the options to set are shown below
3) Here are some of the things to build in:
  • The title says Choose CBeebies file
  • The default button says Choose TV file
  • There are two filters - Teletubbies (for all .txt files) and Tweenies (for all .xls files)
  • The dialog box opens with the File set 2 folder pre-selected
  • The initial view of files is as large icons
4) Your macro should display the following message if your user chooses Cancel:
Exercise screen-shot 661 Display this message if the button chosen value is 0
5) Your macro should display this message otherwise:
Exercise screen-shot 662 Display the file chosen otherwise
6) Save your macro file with a suitable name, then close it down.

Thank you for showing an interest in this Excel 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 copyright Wise Owl Business Solutions Ltd 2008.  All rights reserved..