View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ronald Dodge[_2_] Ronald Dodge[_2_] is offline
external usenet poster
 
Posts: 130
Default Excel File Open and Locking Issue

Is there an easy way to test to see if a particular Excel file is currently
open and locked via VBA without trying to open the file?

I would like to test this prior to VBA using the TransferSpreadsheet method
in Access. If the file is open, the code will be stuck on
"TransferSpreadsheet" line until the file is closed out, which then the code
will error out. Therefore, if the file is open and locked, I would like VBA
to pick up on this, display an error message with the fact the file is open
and locked, and by whom. If need be, this can be going through Windows API.

--

Sincerely,

Ronald R. Dodge, Jr.
Master MOUS 2000