A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Problem when reading closing Outlook form that uses Excel sheet



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old November 9th 06, 04:34 PM posted to microsoft.public.outlook.program_forms
[email protected]
external usenet poster
 
Posts: 14
Default 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

Ads
 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help in setting active Excel work sheet in VB6. Craigbob Outlook and VBA 1 October 10th 06 07:40 AM
shortcut in excel sheet to and Outlook email Finny Outlook - General Queries 2 September 29th 06 05:00 PM
How do I Autopopulate an Outlook form from an Excel Sheet? AttyBhai Outlook - Using Forms 1 September 19th 06 02:18 PM
Messages in inbox delete when closing after reading? Arnarama Outlook - Installation 1 August 24th 06 02:10 AM
How can I extract share calender information to excel sheet TILLYCHIPS Outlook - Calandaring 1 April 17th 06 04:37 PM


All times are GMT +1. The time now is 11: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-2025 Outlook Banter.
The comments are property of their posters.