+ Reply to Thread
Results 1 to 6 of 6

How to automatically generate invoices for selected rows?

  1. #1
    Registered User
    Join Date
    08-24-2015
    Location
    Hyderabad, India
    MS-Off Ver
    MS 365
    Posts
    27

    How to automatically generate invoices for selected rows?

    I have written a code which automatically generates invoices if you click the command button "generate invoices" in "TripSummary" worksheet using the template in "Basic" worksheet.

    But I want a code where invoices of only selected rows (by introducing checkboxes/ other method) gets generated and not all the rows.

    Attached Files Attached Files
    Last edited by sebastiand95; 02-04-2019 at 07:53 AM.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Need help with my VBA code

    Title is now much more descriptive Thank you
    Last edited by Pepe Le Mokko; 02-04-2019 at 07:57 AM.

  3. #3
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: How to automatically generate invoices for selected rows?

    Create checkbox for each row, connect them to particular row (ex. checkbox in cell A1, connected with value to cell A1), then in Your macro Private Sub CommandButton1_Click() loop though whole column A and run main action from this macro only for Ax=1 (replace For myRow = 2 To lr for:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Instead of creating checkboxes for each row, You can also do it by manual entry ex. X in col A and then in macro instead of checking = 1, You can to = "X"
    Idea mainly the same, but creating 50 checkboxes, set them for cells......As You wish.
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,428

    Re: How to automatically generate invoices for selected rows?

    Try changing this

    Please Login or Register  to view this content.
    To this

    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  5. #5
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: How to automatically generate invoices for selected rows?

    will create the checkboxes with a link to the row
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by nigelog; 02-04-2019 at 01:03 PM.

  6. #6
    Registered User
    Join Date
    08-24-2015
    Location
    Hyderabad, India
    MS-Off Ver
    MS 365
    Posts
    27

    Re: How to automatically generate invoices for selected rows?

    Just what I wanted. Thanks!

+ 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. Replies: 9
    Last Post: 05-21-2018, 04:34 PM
  2. [SOLVED] Need help with VBA code. Tons of code seperated in two, second part of code doesn't work.
    By FragaGeddon in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 11-30-2015, 11:46 AM
  3. [SOLVED] Pattern Building VBA Code - Working code, would like to use cleaner code
    By Benisato in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-10-2015, 03:05 PM
  4. [SOLVED] Excel VB code. Message pops up while code running asking question. Code must not wait.
    By Heinrich Venter in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-28-2014, 06:10 AM
  5. [SOLVED] VBA code for assigning a numeric code to text; then numeric code populates table
    By cteaster in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-14-2014, 08:01 PM
  6. Replies: 2
    Last Post: 03-09-2013, 04:30 AM

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