+ Reply to Thread
Results 1 to 4 of 4

Macro help creating claim numbers in a workorder

  1. #1
    Registered User
    Join Date
    04-20-2019
    Location
    ohio
    MS-Off Ver
    office 2007
    Posts
    2

    Macro help creating claim numbers in a workorder

    Some background in what I am trying to accomplish:

    I schedule service appointments for a large shop and create the workorder (with a unique claim number per sheet) for the shop. I only have room for 3-4 items per workorder (in order to leave space for the shop to be able to document their work). I often end up with 10+ workorder pages per service visit (each page requires a unique claim number). Customers schedule several months in advance and frequently add on after initial workorder is created. Also, occasionally someone else in my office needs to create a workorder, so the master file will be accessible through a share folder and needs to recognize saves (claim number creation wise)from different accounts (if that's relevant). I need the overall functionality to be as user friendly as possible.

    I found a YouTube tutorial from Mr Excel ("Learn Excel 2010 - "Next Invoice Number": Podcast #1505" ...forum won't allow me to post a link) that is super helpful and gets me close to where I need to be, however, I am working with Claim numbers instead of Invoice numbers. Functionally, I think the macros should be close, but this saves to one specific file path every time, which doesn't work for my application. These are the codes for the specific process in the address above:

    Macro #1: Generate the next invoice number

    Please Login or Register  to view this content.
    Macro #2: Save invoice with new name

    Please Login or Register  to view this content.
    Again, that functionality is close but not exactly what I need.
    Is there a macro option that instead of saving to a designated single file (which I don't have), it will open a file path window to direct it? I.E. Create "Save to..." button
    Also is there a secondary macro option that would allow me to "merge" with an existing excel workbook (again with a file path window) and save? I.E. Create "Merge with..." button

    I would like the macros to only be enabled in the master file, and be disabled once the file is saved to the secondary location.
    Last edited by jeffreybrown; 04-20-2019 at 10:08 AM. Reason: Please use code tags!

  2. #2
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Macro help creating claim numbers in a workorder

    See if this works for you

    Please Login or Register  to view this content.
    Last edited by JLGWhiz; 04-20-2019 at 11:43 AM.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

  3. #3
    Registered User
    Join Date
    04-20-2019
    Location
    ohio
    MS-Off Ver
    office 2007
    Posts
    2

    Re: Macro help creating claim numbers in a workorder

    I got a compile error: Sub or function not defined

    Also, compile error not-withstanding, this is to save to a new workbook to a chosen location, which is step one of my application. Is there a macro that will allow me to save to an existing workbook by merging? I know I can do this manually, I assume there is a way to automate the process via macros.

  4. #4
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Macro help creating claim numbers in a workorder

    It will give that error if you do not have this
    Please Login or Register  to view this content.
    in a module that can be accessed.

    How would you want to merge? You can copy the worksheet to the other workbook. Copy the used range to an existing sheet in the other workbook. or copy data from a sheet in the source workbook and itegrate it with data on a sheet in the other workbook. The user has to define how they want the data to be managed by which sheet and which ranges the data comes from and which sheet and which ranges the data goes to.

+ 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. Travel Expense Claim Form
    By rambai in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-01-2019, 02:47 AM
  2. Replies: 3
    Last Post: 10-16-2017, 08:02 AM
  3. Creating Macro that detects what numbers/how many numbers are being skipped in a column
    By everydayiwakeup in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-02-2017, 08:35 AM
  4. Replies: 0
    Last Post: 07-11-2016, 03:09 PM
  5. Excel Claim Sorting
    By Dnyan in forum Excel General
    Replies: 23
    Last Post: 08-01-2011, 02:10 AM
  6. Mileage Claim Formula
    By johndavies in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 08-14-2006, 04:35 AM
  7. Creating a macro to replace numbers
    By Phil Tukey in forum Excel General
    Replies: 8
    Last Post: 08-18-2005, 02:05 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