View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Spreadsheet opened by user or programme

From help on Application.UserControl

True if the application is visible or if it was created or started by the
user. False if you created or started the application programmatically by
using the CreateObject or GetObject functions, and the application is
hidden. Read/write Boolean.

--
Regards,
Tom Ogilvy

"Jenni" wrote in message
m...
Hi, what I'm, wanting to know is if there is a way of knowing if a
spreadsheet was opened by a user clicking on the file name, or if it
was opened by another programme.

something like this:

Private Sub form_activate

If "form was opened by user" then
'do stuff
Else
'form was opened by onother programme - Access in this case
'do other stuff
End if

End Sub

Thanks in advance
Jenni