+ Reply to Thread
Results 1 to 5 of 5

VBA Code for autoincrement after printing

  1. #1
    Registered User
    Join Date
    09-27-2023
    Location
    Leiden
    MS-Off Ver
    Office 365 Version 2401
    Posts
    7

    VBA Code for autoincrement after printing

    Hello,

    I am working on a batch sheet for our lab. We use batch codes to give every recipe a unique code. We want a sheet that can be filled in by hand, so the batch codes need to be above the table, but changing this every time before printing will be an incredible inconvenience. I tried finding a solution online, but the code didn't work. I want to increase the value of b1, b11, b21 after printing by 3. These values are located in sheet4. I used the following code:

    Please Login or Register  to view this content.
    If someone has a suggestion to fix this, that would be amazing.

    I really appreciate any help you can provide.
    Test.xlsx
    Last edited by Aanhaai; 02-15-2024 at 03:16 PM.

  2. #2
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    1,980

    Re: VBA Code for autoincrement after printing

    Does this work for you?

    Please Login or Register  to view this content.

  3. #3
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: VBA Code for autoincrement after printing

    You could try this code:
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    The numbers wil be upped 2 in B1 and the rest follows
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  4. #4
    Registered User
    Join Date
    09-27-2023
    Location
    Leiden
    MS-Off Ver
    Office 365 Version 2401
    Posts
    7

    Re: VBA Code for autoincrement after printing

    This worked for me, many thanks!

  5. #5
    Registered User
    Join Date
    09-27-2023
    Location
    Leiden
    MS-Off Ver
    Office 365 Version 2401
    Posts
    7

    Re: VBA Code for autoincrement after printing

    Thanks for the help. Since the other code worked, I've not tried this one yet, but i will give it a try aswell!

+ 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. Data Validation Excel with Offset and Autoincrement
    By iincitr in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-22-2020, 08:12 AM
  2. [SOLVED] Creating String with number autoincrement custom list
    By jaryszek in forum Excel General
    Replies: 4
    Last Post: 01-28-2019, 08:56 AM
  3. [SOLVED] modify vba to autoincrement hours
    By jrtaylor in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-26-2017, 10:37 AM
  4. [SOLVED] How to stop autoincrement in formula
    By cinu97 in forum Excel General
    Replies: 3
    Last Post: 05-19-2015, 10:44 PM
  5. Autoincrement Vlookup While copying down a column
    By Unimog1 in forum Excel General
    Replies: 1
    Last Post: 01-19-2015, 03:44 PM
  6. Autoincrement a single cell on a template
    By maddmikk in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-18-2013, 06:37 PM
  7. [SOLVED] if there is data in B12* autoincrement A12 number
    By zit1343 in forum Excel General
    Replies: 3
    Last Post: 04-09-2012, 12:00 PM

Tags for this Thread

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