+ Reply to Thread
Results 1 to 7 of 7

Print dialog : problem when user click printpreview

  1. #1
    François
    Guest

    Print dialog : problem when user click printpreview

    I have this
    Application.EnableEvents = False
    frmCreche.Hide ' this is mandatory otherwise problem to print preview
    Application.Dialogs(xlDialogPrint).Show
    frmCreche.Show
    Application.EnableEvents = True

    The problem is that I have to hide the userform in order to be able to
    manage the a printpreview. Cause in that case, the userform is still
    displayed and it's impossible to access the controls of the print preview.
    Is it a way to handle this without having to hide the form ?.

  2. #2
    Tom Ogilvy
    Guest

    RE: Print dialog : problem when user click printpreview

    If you are using xl2000 or later, show the form as modeless when you show it
    before this code

    frmCreche.show vbModeless

    --
    Regards,
    Tom Ogilvy


    "François" wrote:

    > I have this
    > Application.EnableEvents = False
    > frmCreche.Hide ' this is mandatory otherwise problem to print preview
    > Application.Dialogs(xlDialogPrint).Show
    > frmCreche.Show
    > Application.EnableEvents = True
    >
    > The problem is that I have to hide the userform in order to be able to
    > manage the a printpreview. Cause in that case, the userform is still
    > displayed and it's impossible to access the controls of the print preview.
    > Is it a way to handle this without having to hide the form ?.


  3. #3
    François
    Guest

    RE: Print dialog : problem when user click printpreview

    Thanks Tom for this quick answer.
    But then I do not need to hide the form before ?

    "Tom Ogilvy" wrote:

    > If you are using xl2000 or later, show the form as modeless when you show it
    > before this code
    >
    > frmCreche.show vbModeless
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    >
    > "François" wrote:
    >
    > > I have this
    > > Application.EnableEvents = False
    > > frmCreche.Hide ' this is mandatory otherwise problem to print preview
    > > Application.Dialogs(xlDialogPrint).Show
    > > frmCreche.Show
    > > Application.EnableEvents = True
    > >
    > > The problem is that I have to hide the userform in order to be able to
    > > manage the a printpreview. Cause in that case, the userform is still
    > > displayed and it's impossible to access the controls of the print preview.
    > > Is it a way to handle this without having to hide the form ?.


  4. #4
    Tom Ogilvy
    Guest

    RE: Print dialog : problem when user click printpreview

    when a form is modal, it doesn't allow you to select anywhere else until the
    form is dismissed. when it isn't modal, it is like any other window. So no,
    you should not need to hide it if you show it as modeless.

    --
    Regards,
    Tom Ogilvy



    "François" wrote:

    > Thanks Tom for this quick answer.
    > But then I do not need to hide the form before ?
    >
    > "Tom Ogilvy" wrote:
    >
    > > If you are using xl2000 or later, show the form as modeless when you show it
    > > before this code
    > >
    > > frmCreche.show vbModeless
    > >
    > > --
    > > Regards,
    > > Tom Ogilvy
    > >
    > >
    > > "François" wrote:
    > >
    > > > I have this
    > > > Application.EnableEvents = False
    > > > frmCreche.Hide ' this is mandatory otherwise problem to print preview
    > > > Application.Dialogs(xlDialogPrint).Show
    > > > frmCreche.Show
    > > > Application.EnableEvents = True
    > > >
    > > > The problem is that I have to hide the userform in order to be able to
    > > > manage the a printpreview. Cause in that case, the userform is still
    > > > displayed and it's impossible to access the controls of the print preview.
    > > > Is it a way to handle this without having to hide the form ?.


  5. #5
    François
    Guest

    RE: Print dialog : problem when user click printpreview

    Tom,
    Still I need to hide it cause it's a too large window.
    so it's OK to hide it with frm.hide , but to redisplay it (and continue the
    code ...) I would like to avoid to use .show ... and I do not find a unhide.
    I have tried with frmCreche.Visible = True or False but this is not allowed.

    Any idea would be better than welcome to help me.

    Thanks.

    "Tom Ogilvy" wrote:

    > when a form is modal, it doesn't allow you to select anywhere else until the
    > form is dismissed. when it isn't modal, it is like any other window. So no,
    > you should not need to hide it if you show it as modeless.
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    >
    >
    > "François" wrote:
    >
    > > Thanks Tom for this quick answer.
    > > But then I do not need to hide the form before ?
    > >
    > > "Tom Ogilvy" wrote:
    > >
    > > > If you are using xl2000 or later, show the form as modeless when you show it
    > > > before this code
    > > >
    > > > frmCreche.show vbModeless
    > > >
    > > > --
    > > > Regards,
    > > > Tom Ogilvy
    > > >
    > > >
    > > > "François" wrote:
    > > >
    > > > > I have this
    > > > > Application.EnableEvents = False
    > > > > frmCreche.Hide ' this is mandatory otherwise problem to print preview
    > > > > Application.Dialogs(xlDialogPrint).Show
    > > > > frmCreche.Show
    > > > > Application.EnableEvents = True
    > > > >
    > > > > The problem is that I have to hide the userform in order to be able to
    > > > > manage the a printpreview. Cause in that case, the userform is still
    > > > > displayed and it's impossible to access the controls of the print preview.
    > > > > Is it a way to handle this without having to hide the form ?.


  6. #6
    Tom Ogilvy
    Guest

    Re: Print dialog : problem when user click printpreview

    I don't understand your concern with using show. That is the only command
    that will show the form again.

    Your response about the form being too big is a little surprising since your
    original question was:
    > Is it a way to handle this without having to hide the form ?.


    --
    Regards,
    Tom Ogilvy

    "François" <[email protected]> wrote in message
    news:[email protected]...
    > Tom,
    > Still I need to hide it cause it's a too large window.
    > so it's OK to hide it with frm.hide , but to redisplay it (and continue

    the
    > code ...) I would like to avoid to use .show ... and I do not find a

    unhide.
    > I have tried with frmCreche.Visible = True or False but this is not

    allowed.
    >
    > Any idea would be better than welcome to help me.
    >
    > Thanks.
    >
    > "Tom Ogilvy" wrote:
    >
    > > when a form is modal, it doesn't allow you to select anywhere else until

    the
    > > form is dismissed. when it isn't modal, it is like any other window.

    So no,
    > > you should not need to hide it if you show it as modeless.
    > >
    > > --
    > > Regards,
    > > Tom Ogilvy
    > >
    > >
    > >
    > > "François" wrote:
    > >
    > > > Thanks Tom for this quick answer.
    > > > But then I do not need to hide the form before ?
    > > >
    > > > "Tom Ogilvy" wrote:
    > > >
    > > > > If you are using xl2000 or later, show the form as modeless when you

    show it
    > > > > before this code
    > > > >
    > > > > frmCreche.show vbModeless
    > > > >
    > > > > --
    > > > > Regards,
    > > > > Tom Ogilvy
    > > > >
    > > > >
    > > > > "François" wrote:
    > > > >
    > > > > > I have this
    > > > > > Application.EnableEvents = False
    > > > > > frmCreche.Hide ' this is mandatory otherwise problem to print

    preview
    > > > > > Application.Dialogs(xlDialogPrint).Show
    > > > > > frmCreche.Show
    > > > > > Application.EnableEvents = True
    > > > > >
    > > > > > The problem is that I have to hide the userform in order to be

    able to
    > > > > > manage the a printpreview. Cause in that case, the userform is

    still
    > > > > > displayed and it's impossible to access the controls of the print

    preview.
    > > > > > Is it a way to handle this without having to hide the form ?.




  7. #7
    François
    Guest

    Re: Print dialog : problem when user click printpreview

    Yes you are correct the reason not to hide the form was the problem with the
    ..show (without modeless).
    So There is not problem to have 2 times the .show(modeless) one on loading
    the the other after (.hide , printdialog) ?

    Thanks.

    "Tom Ogilvy" wrote:

    > I don't understand your concern with using show. That is the only command
    > that will show the form again.
    >
    > Your response about the form being too big is a little surprising since your
    > original question was:
    > > Is it a way to handle this without having to hide the form ?.

    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    > "François" <[email protected]> wrote in message
    > news:[email protected]...
    > > Tom,
    > > Still I need to hide it cause it's a too large window.
    > > so it's OK to hide it with frm.hide , but to redisplay it (and continue

    > the
    > > code ...) I would like to avoid to use .show ... and I do not find a

    > unhide.
    > > I have tried with frmCreche.Visible = True or False but this is not

    > allowed.
    > >
    > > Any idea would be better than welcome to help me.
    > >
    > > Thanks.
    > >
    > > "Tom Ogilvy" wrote:
    > >
    > > > when a form is modal, it doesn't allow you to select anywhere else until

    > the
    > > > form is dismissed. when it isn't modal, it is like any other window.

    > So no,
    > > > you should not need to hide it if you show it as modeless.
    > > >
    > > > --
    > > > Regards,
    > > > Tom Ogilvy
    > > >
    > > >
    > > >
    > > > "François" wrote:
    > > >
    > > > > Thanks Tom for this quick answer.
    > > > > But then I do not need to hide the form before ?
    > > > >
    > > > > "Tom Ogilvy" wrote:
    > > > >
    > > > > > If you are using xl2000 or later, show the form as modeless when you

    > show it
    > > > > > before this code
    > > > > >
    > > > > > frmCreche.show vbModeless
    > > > > >
    > > > > > --
    > > > > > Regards,
    > > > > > Tom Ogilvy
    > > > > >
    > > > > >
    > > > > > "François" wrote:
    > > > > >
    > > > > > > I have this
    > > > > > > Application.EnableEvents = False
    > > > > > > frmCreche.Hide ' this is mandatory otherwise problem to print

    > preview
    > > > > > > Application.Dialogs(xlDialogPrint).Show
    > > > > > > frmCreche.Show
    > > > > > > Application.EnableEvents = True
    > > > > > >
    > > > > > > The problem is that I have to hide the userform in order to be

    > able to
    > > > > > > manage the a printpreview. Cause in that case, the userform is

    > still
    > > > > > > displayed and it's impossible to access the controls of the print

    > preview.
    > > > > > > Is it a way to handle this without having to hide the form ?.

    >
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1