Results 1 to 5 of 5

Disable printing in Excel 2010 unless cell(s) are filled out

Threaded View

  1. #1
    Registered User
    Join Date
    09-21-2011
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    3

    Disable printing in Excel 2010 unless cell(s) are filled out

    Hello

    I have Excel 2010 and I am trying to disable the print funtion until certain cells (AO6, F9, AO9, BD0, etc) are filled out.

    I found this code on the website, but does not work for me...

                  Private Sub Workbook_BeforePrint(Cancel As Boolean)
                      If IsEmpty(Worksheets("HRM").Range("bj2")) Then
                      Cancel = True
                      Msg = MsgBox("Please complete cells to continue ", vbOKOnly)
                  Else
                      If Not IsEmpty(Worksheets("HRM").Range("bj2")) Then
                      Cancel = False
                      End If
                  End If
                  End Sub
    Is there someting i am missing?


    TY
    Last edited by toddp; 09-21-2011 at 01:56 PM.

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