none RRS feed

  • Question

  • On my computer when I'm using Application.Dialogs(Excel.xlBuiltInDialog.xlDialogSaveAs).Show(FileName,Excel.XlFileFormat.xlExcel8)

    Is ok.

    But when I'm deploying my solution on customer.  All computer the dialog box is on the back of the software.

    The costumer doing ALT+TAB to switch to save dialog box each time.

    How I can force the focus to the Save dialog box


    Wednesday, May 16, 2012 2:12 PM


All replies

  • On my computer I'm using Excel version 14 (2010) and costumer is Version 12(2007)

    I try the software on other computer on my network there are Excel 2007,

    When I'm execute the program on Visual Studio 2010 It's ok, but when I' running the program.exe out of Visual Studio 2010 the probleme was there.

    My conclusion is when the Customer are Excel 2007 the focus is not on dialog box of excel

    Wednesday, May 16, 2012 2:23 PM
  • Hi Francois,

    It's based on my experience that you might invoke Win32 API to handle it.

    Best Regards,


    Thursday, May 17, 2012 1:52 AM
  • Thank you for your answer.

    Do you have a example for invoke Win32 to handle it ?


    Thursday, May 17, 2012 2:46 PM
  • Hi Francois,

    I'm not family with it. However I think that might be a workround, I suggest you go to to see whether you can get help about win32 api that place.

    Best Regards,


    Friday, May 18, 2012 2:21 AM
  • I resolve with this command

    Imports System.Runtime.InteropServices

    <DllImport("user32.dll", SetLastError:=True)> _
    Private Shared Function BringWindowToTop(ByVal hwnd As IntPtr) As Boolean
    End Function


    Wednesday, May 23, 2012 12:36 PM