View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
keepITcool keepITcool is offline
external usenet poster
 
Posts: 2,253
Default GetOpenFileName called from modal userform.. enables workbook windows. BUG?


Anyone knows a fix for this?
or should I use API's to disable the workbook windows?

New workbook, insert a userform with following code

Private Sub UserForm_Click()
Dim v
v = Application.GetOpenFilename
If v < False Then Workbooks.Open v
End Sub

run the form. (MODAL)
click the form and open a workbook.

Excel menu;s are still disabled, but all workbook windows in the excel
desktop are now ENABLED!

Context menu's ARE available. try copy and paste somewhere in the newly
opened workbook. and excel will crash. (XP/ 2003)

(minimizing a workbook is ok. but if you close the
newly opened workbook via the "X button it crashed your form.
with an "automation error: invoked a disconnect" error.


--
keepITcool

| www.XLsupport.com | keepITcool chello nl | amsterdam