Results 1 to 3 of 3

DISALLOW PRINTING IF CELLS ARE INCOMPLETE

This is a discussion on DISALLOW PRINTING IF CELLS ARE INCOMPLETE within the Excel Questions forums, part of the Question Forums category; I've been trying to find the correct code to disallow printing when certain cells are left blank. The problem I'm ...

  1. #1
    Board Regular
    Join Date
    Mar 2004
    Location
    Waycross, GA
    Posts
    52

    Default DISALLOW PRINTING IF CELLS ARE INCOMPLETE

    I've been trying to find the correct code to disallow printing when certain cells are left blank. The problem I'm having is the cell contents will have in some cases both letters and numbers, as in serial numbers (3KZ00525) or dealer codes (D050).
    Any help would be greatly appreciated

  2. #2
    DRJ
    DRJ is offline
    MrExcel MVP DRJ's Avatar
    Join Date
    Feb 2002
    Location
    California
    Posts
    3,856

    Default

    Hi - Welcome to the board

    Put this code in the thisworkbook section of vbe

    Code:
    Private Sub Workbook_BeforePrint(Cancel As Boolean)
    
        If Range("A1").Value = vbNullString Then
            Cancel = True
            MsgBox ("Fill out the information for A1"), vbCritical
            Else
        End If
        
    End Sub

  3. #3
    Board Regular
    Join Date
    Mar 2004
    Location
    Waycross, GA
    Posts
    52

    Default Re: DISALLOW PRINTING IF CELLS ARE INCOMPLETE

    That is it Thanks so much!!!!

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
  •  


DMCA.com