VB code to export named ranges from Excel to text files.
## Deliverables
**Specification**
?
**Workbook overview (attached)**
?
* Workbook contains 4 sheets:
* Control ??" to control export of ranges to text files
* Sheets 1. 2., 3. ??" each of which contains tables in named ranges
?
* Workbook contains 3 modules:
* ExportToText ??" code required
* Navigate ??" code already written (nothing further required)
* Properties ??" code written, but problem invoking
?
?
**2. ExportToText**
?
Purpose: Export named ranges to text files (format TAB delimited)
?
?
* VB required: When “Export Files?? is clicked (on Control sheet), it should export the **ranges** specified in the table to text files (as named). The table has 4 columns:
* Columns 1 ??" Source sheet for each range (entered manually)
* Column 2 - Source range name for each range to be exported to text file (entered manually)
* Column 3 - Text file name to be created for each export (entered manually)
* Column 4 ??" Last exported (written to by code as current date and time)
?
* Key points
* **Named Ranges** to be exported to named destination in column 3 (i.e. **no** absolute or relative cell references)
* Macro to read through table on Control until last row (no need to cater for blank rows). The cell references for start row can be absolute (but not last row). Columns will not change
* Prefer written as two modules (first one controls all text file exports; second simply runs the export for each range to be exported)
* Time of export written to column D on Control sheet
?
?
**3. Properties**
?
Purpose: Updates file properties whenever file opened (or before save).
?
* Properties as set in module
* Whenever file is opened, File Properties information to be updated
* Problem is to how to run the code when file opened
* Code must be capable of being hidden from other users