Results 1 to 7 of 7

Disable print issue

Threaded View

thyme22 Disable print issue 09-29-2014, 01:07 PM
Winon Re: Disable print issue 09-29-2014, 01:15 PM
thyme22 Re: Disable print issue 09-29-2014, 01:36 PM
Winon Re: Disable print issue 09-29-2014, 01:43 PM
thyme22 Re: Disable print issue 09-29-2014, 02:00 PM
thyme22 Re: Disable print issue 10-02-2014, 07:47 AM
Winon Re: Disable print issue 10-02-2014, 02:35 PM
  1. #1
    Registered User
    Join Date
    09-28-2014
    Location
    Toronto, Canada
    MS-Off Ver
    2010
    Posts
    4

    Disable print issue

    I'm trying to create a macro that disable printing until all required fields have been filled in. I have two issues, the code does check all the cells required, but once all have been filled in it doesn't print. The second issue is that you can still print using the print button, or selecting from the file tab. The code is listed below, please help!!!


    Private Sub CommandButton1_Click()
    
    Dim rngRangeToCheckBeforePrinting As Range
        Dim rngCell As Range
         
        With ThisWorkbook.Worksheets("Voluntary - Outside Dept Sheet")
            Set rngRangeToCheckBeforePrinting = Application.Union(.Range("C3"), .Range("C4"), .Range("C5"), .Range("F5"), .Range("D8"), .Range("D9"))
            For Each rngCell In rngRangeToCheckBeforePrinting
                If IsEmpty(rngCell) Then
                    Cancel = True
                    MsgBox "Please ensure that all fields have been entered", vbOKOnly + vbInformation, "Unable to print"
                    Exit For
                End If
            Next rngCell
        End With
        Set rngRangeToCheckBeforePrinting = Nothing
        Set rngCell = Nothing
    End Sub
    Last edited by thyme22; 09-29-2014 at 01:59 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Disable Print for the set of worksheets.
    By muralidaran in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-16-2014, 03:54 AM
  2. Disable Print Screen
    By dwint in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-24-2013, 03:03 PM
  3. Disable Print button in Full Print Preview
    By RaquelAR in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-17-2013, 02:03 PM
  4. Disable Print
    By Stevedarby02 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-29-2008, 11:33 AM
  5. [SOLVED] disable print
    By Walter P in forum Excel General
    Replies: 6
    Last Post: 07-20-2006, 03:12 PM

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