+ Reply to Thread
Results 1 to 4 of 4

How to: If field is empty do not print sheet

  1. #1
    Registered User
    Join Date
    06-11-2010
    Location
    The Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    81

    How to: If field is empty do not print sheet

    I have a script running like this:
    Please Login or Register  to view this content.
    and it continues on. But if for instance A4 field in Data is empty I want it not to print out that barcode sheet. But I do want it to continue to the next field to check.

    Does anybody have a idea how I can arrange this in the macro?
    Last edited by dutchmaste; 06-11-2010 at 07:01 AM. Reason: code tags

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: How to: If field is empty do not print sheet

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here

    Code tags added for you, but this time only

  3. #3
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: How to: If field is empty do not print sheet

    I've re-written your code a bit, try this...

    Please Login or Register  to view this content.

    Change Range("A2:A4") to cover the range you want to process.

    Hope it helps,

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  4. #4
    Registered User
    Join Date
    06-11-2010
    Location
    The Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    81

    Re: How to: If field is empty do not print sheet

    Thank you very much Dom. It works and is more clear now.

    My apoligy for not quoting the code.

+ 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