cannot open Excel file from Explorer

S

Supicek

Hi,

at startup location I have one xls file which creates additinal menu option
and then hide itself. Recently I have created a welcome splash screen which
appears at thisworkobook.open event

***********
Private Sub Workbook_Open()

Application.Wait (Now + TimeValue("0:00:10"))
myWorkbookName = ThisWorkbook.Name
Windows(myWorkbookName).Visible = False
frmLogo.Show

Call CreateMenuOraculum

End Sub
************


everything works fine apart of opening an excel file from Windows
explorer/Total commander by double click. If Excel is already running then
the clicked files are correctly opened, however if Excel is not running then
the file is not opened.

When I couble click the excel file - the Excel is launched, the file at
startup location is opened (menu is created and the splash screen appeares)
however the clicked file is not opened. I have to click the file again after
Excel is launched.

Any idea how to correct it?
 
D

Dave Peterson

Are you using xl2007?

If you are...

You are suffering from a common problem that lots of people have complained
about. The workbook is open, just not visible.

One way to see it is to click on the Office button and start to open another
workbook, but then just dismiss the dialog. You may see your workbook open
after this. (Ctrl-O, then escape may work???)

Currently, there isn't a fix--just workarounds.
 
S

Supicek

Sorry I have forgottent to note the Excel version. I am using Excel 2003.
Dave this is not the issue you have described. I found the code which causes
the trouble - see comments in CAPITALS in the script

Thisworkbook.Open opens a form frmLogo. on activate event there is a
following code:

*********
Sub UserForm_Activate()

On Error Resume Next
Me.lblVersion = myVersion
Me.lblDate = myOraculumDate

'THIS CODE CAUSES THE TROUBLE AND EXCEL FORGETS ABOUT OPENING THE
FILE WHICH HAS BEEN CLICKED
'Application.OnTime Now + TimeValue("00:00:01"), "KillTheForm"

'THIS LINE WORKS FINE AND OPENS THE CLICKED FILE, JUST THE LOGO FORM
'APPEARS FOR A SHORT TIME
Application.OnTime Now, "KillTheForm"
End Sub
*********




Supicek
 
D

Dave Peterson

If all your users are using xl2k or higher, maybe you could try:

frmLogo.Show False

(Just a guess. I'm not sure what order events will be processed.)
Sorry I have forgottent to note the Excel version. I am using Excel 2003.
Dave this is not the issue you have described. I found the code which causes
the trouble - see comments in CAPITALS in the script

Thisworkbook.Open opens a form frmLogo. on activate event there is a
following code:

*********
Sub UserForm_Activate()

On Error Resume Next
Me.lblVersion = myVersion
Me.lblDate = myOraculumDate

'THIS CODE CAUSES THE TROUBLE AND EXCEL FORGETS ABOUT OPENING THE
FILE WHICH HAS BEEN CLICKED
'Application.OnTime Now + TimeValue("00:00:01"), "KillTheForm"

'THIS LINE WORKS FINE AND OPENS THE CLICKED FILE, JUST THE LOGO FORM
'APPEARS FOR A SHORT TIME
Application.OnTime Now, "KillTheForm"
End Sub
*********

Supicek
 
S

Supicek

Yes, you got it!!!
Thank you.

--
Supicek


Dave Peterson said:
If all your users are using xl2k or higher, maybe you could try:

frmLogo.Show False

(Just a guess. I'm not sure what order events will be processed.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top