View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
MSweetG222 MSweetG222 is offline
external usenet poster
 
Posts: 158
Default Locking a worksheet during the reading of it

Jason,
I don't know if your workbook is too big to save as a different workbook
name and use the "copy" workbook as your reference. That way the external
prg can update the original and you can work with the copy.

FileCopy "C:\MyOriginal.xls" "C:\MyCopy.xls"

You can kill the copy when you are done.

Kill "C:\MyCopy.xls"


--
Thx
MSweetG222



"Jason" wrote:

Hello All!

I have an Excel 2003 workbook that contains Exchange Rates that is
automatically updated by an external program. I have used VSTO 2005 to
create an application that reads the updated Exchange Rates and saves them to
a database using a webservice.

The problem that I'm having is that when I'm reading my values, if any of
the cells change, my application crashes. Is there a way to lock the values
of the worksheet so that they don't get changed while I'm trying to read them?