+ Reply to Thread
Results 1 to 7 of 7

Excel worksheet printout

  1. #1
    Registered User
    Join Date
    04-23-2018
    Location
    Sweden
    MS-Off Ver
    365
    Posts
    13

    Excel worksheet printout

    Hi guys! My name is Lucas and im from Sweden so bare with me (language :P)

    I have a question regarding VBA/Macros, is there a way an excel sheet could be printed automatically if i input something into a cell?
    For example, i have scanned a barcode and it shows in cell "a1" and if i scan another one it shows in cell "a2" is there any way the excel worksheet could be printed automatically after 2 barcode scans? Or could i somehow generate a barcode and link it so everytime i scan it the whole sheet prints?
    I would love it so much if someone could help me with this

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Excel worksheet printout

    Are you always scanning in A1:A2 only, or do keep filling down in A3:A4 then A5:A6...etc?

    Do you want to clear A1:A2 after printing?
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    04-23-2018
    Location
    Sweden
    MS-Off Ver
    365
    Posts
    13

    Re: Excel worksheet printout

    Hi alpha!
    Thanks for the reply, yes i will only scan one or 2 barcodes so A1:A2 only and i would like it to clear A1:A2 after printing so the next time i scan it will start all over in A1:A2

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Excel worksheet printout

    This will print when you scan something in A2. That's the trigger. It then clears A1:A2.

    To install the code:
    • Right-click on the sheet tab.
    • Select View Code from the pop-up context menu.
    • Paste the code from below in the worksheet's code module.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-23-2018
    Location
    Sweden
    MS-Off Ver
    365
    Posts
    13

    Re: Excel worksheet printout

    Alpha you are the man!! Thank you so much it worked wonders!! Hope i could ask you one more question I scanned 2 barcodes and it all worked, it printed the sheet and cleared A1:A2. I will mostly scan 2 barcodes but let's say that i only scan one barcode, could the sheet be printed automatically, is there a possibility to add it as an alternative?
    Last edited by lucas94; 04-23-2018 at 11:50 PM.

  6. #6
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Excel worksheet printout

    Quote Originally Posted by lucas94 View Post
    Alpha you are the man!! Thank you so much it worked wonders!! Hope i could ask you one more question I scanned 2 barcodes and it all worked, it printed the sheet and cleared A1:A2. I will mostly scan 2 barcodes but let's say that i only scan one barcode, could the sheet be printed automatically, is there a possibility to add it as an alternative?
    You could scan the one barcode in A2 and it wold print. Just leave A1 blank.

  7. #7
    Registered User
    Join Date
    04-23-2018
    Location
    Sweden
    MS-Off Ver
    365
    Posts
    13

    Re: Excel worksheet printout

    Thank you so much Alpha!! You are a genius

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Custom Excel form & Printout
    By akd1961 in forum Excel General
    Replies: 1
    Last Post: 08-15-2017, 06:40 AM
  2. Replies: 0
    Last Post: 06-12-2017, 09:30 PM
  3. Printing multiple ranges in multiple worksheet into a single printout
    By frousseau in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-16-2012, 08:53 AM
  4. PrintOut method of worksheet class failed?
    By rbyrd023 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-01-2010, 06:36 PM
  5. How do I wrap Excel columns in a printout?
    By R2 in forum Excel General
    Replies: 1
    Last Post: 04-01-2006, 04:47 AM
  6. Replies: 1
    Last Post: 02-16-2006, 08:20 PM
  7. How do I column wrap an Excel printout
    By Rolls100 in forum Excel General
    Replies: 0
    Last Post: 02-15-2005, 12:51 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