+ Reply to Thread
Results 1 to 3 of 3

locking printing

  1. #1
    !..:: Enang ::..!
    Guest

    locking printing

    Hi All

    How to lock printing untill a cell is filled in with "Ok" ?

    regards,
    Ndoel




  2. #2
    Norman Jones
    Guest

    Re: locking printing

    Hi N,

    Try:
    '=======================>>
    Private Sub Workbook_BeforePrint(Cancel As Boolean)
    Cancel = UCase(Me.Sheets("Sheet1").Range("A1").Value) <> "X"
    End Sub
    '<<=======================

    Change the sheet name and the cell reference to accord with your needs.

    This is workbook event code and should be pasted into the workbook's
    ThisWorkbook module *not a standard module or a sheet module):

    ************************************************************
    Right-click the Excel icon on the worksheet
    (or the icon to the left of the File menu if your workbook is maximised)

    Select 'View Code' from the menu and paste the code.

    Alt-F11 to return to Excel.
    ************************************************************

    If you are not familiar with macros you may wish to visit David McRitchie's
    'Getting Started With Macros And User Defined Functions' at:

    http://www.mvps.org/dmcritchie/excel/getstarted.htm


    ---
    Regards,
    Norman



    "!..:: Enang ::..!" <[email protected]> wrote in message
    news:[email protected]...
    > Hi All
    >
    > How to lock printing untill a cell is filled in with "Ok" ?
    >
    > regards,
    > Ndoel
    >
    >
    >




  3. #3
    !..:: Enang ::..!
    Guest

    Re: locking printing

    thx very much norman, it work :-)
    Now I cannot print untill everything is right


    "Norman Jones" <[email protected]> wrote in message
    news:[email protected]...
    > Hi N,
    >
    > Try:
    > '=======================>>
    > Private Sub Workbook_BeforePrint(Cancel As Boolean)
    > Cancel = UCase(Me.Sheets("Sheet1").Range("A1").Value) <> "X"
    > End Sub
    > '<<=======================
    >
    > Change the sheet name and the cell reference to accord with your needs.
    >
    > This is workbook event code and should be pasted into the workbook's
    > ThisWorkbook module *not a standard module or a sheet module):
    >
    > ************************************************************
    > Right-click the Excel icon on the worksheet
    > (or the icon to the left of the File menu if your workbook is maximised)
    >
    > Select 'View Code' from the menu and paste the code.
    >
    > Alt-F11 to return to Excel.
    > ************************************************************
    >
    > If you are not familiar with macros you may wish to visit David

    McRitchie's
    > 'Getting Started With Macros And User Defined Functions' at:
    >
    > http://www.mvps.org/dmcritchie/excel/getstarted.htm
    >
    >
    > ---
    > Regards,
    > Norman
    >
    >
    >
    > "!..:: Enang ::..!" <[email protected]> wrote in message
    > news:[email protected]...
    > > Hi All
    > >
    > > How to lock printing untill a cell is filled in with "Ok" ?
    > >
    > > regards,
    > > Ndoel
    > >
    > >
    > >

    >
    >




+ 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