![]() |
Problem when reading closing Outlook form that uses Excel sheet
Hi
I have written a custom Outlook form that opens an Excel file and reads in data to be used in various combo box lists. The item_close() function closes down the Excel workbook again. Unfortunately if the user has another Excel workbook open at the time and is in the middle of inputting to a cell, an error is generated. If the user is not in the middle of input it works fine, even if the other workbook has outstanding changes to be saved. Only the Excel sheet containing the combo box data is closed, as is correct. Does anyone know a way around this? Thanks For reference, the code is as follows: Function Item_Open() set ins = item.getinspector set cts = ins.modifiedformpages("Message").controls set xls = GetObject("\\uknpt003\Departments\CentralProcureme nt\ProcurementFormData.xls") .. .. .. End sub .. .. Function Item_Close() xls.close "\\uknpt003\Departments\CentralProcurement\Procure mentFormData.xls" set xls = nothing set cts = nothing set ins = nothing End Function |
All times are GMT +1. The time now is 09:51 AM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com