Thank you.
Your reply makes sense.
I do not know, how to open the workbook in a second task.
How to do that?
Let assume the following scenario:
My app on startup opens Excel spreadsheet. That sheet is what the user sees
and it will let him to do editing.
Now, how to open(?) the same sheet in the second task?
Thanks,
Jack
"stefan onken" wrote in message
...
hi Jack,
imho no.
you can use always CreateObject to open the workbook in a second task and
get data out of a sheet, even if this workbook is in use (in a first task)
and even if it is in edit mode, but you don`t get the latest changes in
the workbook which is open in the first task.
if you need the latest data, you could use On Error (not sure if this
works here, if not http://tinyurl.com/58awp8 ) to check if the sheet is in
edit mode and than interact with the user (ie displaying a msgbox to stop
edit mode) or cancel getting the data.
stefan
Jack wrote:
I do not understand your approach and how that can help me.
In my case I want to have both:
1. being able to pull data out of spreadsheet
and
2. do not interrupt user if he is using spreadsheet at the
same time.
Is that possible?
Thanks,
Jack
"Jack" <replyto@it wrote in message
...
Hello,
My application interacts with Excel spreadsheet.
Periodically it
reads some data from the predefined sheet's column.
Everything works fine, when user does not use that
spreadsheet at the same
time.
However, when user is typing in the sheet at the same time
when my app wants to read data from it there is a problem.
Excel displays 'Component Busy' message with the Switch
to..., Retry and Cancel options. How to solve that problem?
My app uses Excel automation and it connects to Excel using
this code: Public WithEvents moExcelApp As Excel.Application
Set moExcelApp = GetObject(, "Excel.Application")
If moExcelApp Is Nothing Then
Set moExcelApp = CreateObject("Excel.Application")
End If
Your comments appreciated,
Jack