+ Reply to Thread
Results 1 to 13 of 13

automatically create label

  1. #1
    Registered User
    Join Date
    04-19-2010
    Location
    belgium
    MS-Off Ver
    Office 365
    Posts
    53

    automatically create label

    Hello Everyone,

    i am trying to create a kind of a label that our plant needs to apply on every pallet, i am stuck on one point..if we have for example 10 pallets for one delivery, I would need my label to be "copye past" 10 times (with the number 1/10, 2/10, 3/10 etc
    .. ) automatically.
    I have absolutely no clue on how to do this

    my other question if above problem can be solved, how to reset the "form" to on label so it can be re-run for next delivery

    I have attached my excel,
    1) the "Data" sheet is where user should use the process order
    2) Final "Label for Printing" is of course the sheet with the label
    3) "Process order" sheet is where we extract the process orders from ERP
    4) LOVs is where I save all the product number with description, quantity per pallet etc...

    thanks a lot for your help here
    Guismo30
    Attached Files Attached Files

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,055

    Re: automatically create label

    Try the attached file. Just make a selection in E3 of the Data sheet. Please note that the workbook has a blank Label Template. The macro copies that blank template and renames it to "Final Label for Printing". The next time you make a different selection in E3, the old "Final Label for Printing" will be deleted and a new one created. The macro is not in a standard module. It is in the worksheet module. To view the code, do the following: right click the tab name for your Data sheet and click 'View Code'. When done, close the code window to return to your sheet.
    Attached Files Attached Files
    Last edited by Mumps1; 02-28-2023 at 02:38 PM.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Registered User
    Join Date
    04-19-2010
    Location
    belgium
    MS-Off Ver
    Office 365
    Posts
    53

    Re: automatically create label

    Quote Originally Posted by Mumps1 View Post
    Try the attached file. Just make a selection in E3 of the Data sheet. Please note that the workbook has a blank Label Template. The macro copies that blank template and renames it to "Final Label for Printing". The next time you make a different selection in E3, the old "Final Label for Printing" will be deleted and a new one created. The macro is not in a standard module. It is in the worksheet module. To view the code, do the following: right click the tab name for your Data sheet and click 'View Code'. When done, close the code window to return to your sheet.
    wouaw ! thank you soooooo much it is working very fine,

  4. #4
    Registered User
    Join Date
    04-19-2010
    Location
    belgium
    MS-Off Ver
    Office 365
    Posts
    53

    Re: automatically create label

    Hello Mumps1
    I have two small issues with the template and another request
    If I choose an incorrect value in the dop down menu (example first data is "order", program stop working and I have to close all my excel (even not related) and start again, is there a way to solve this?
    My second problem is the fact that I forgot to inform you that I needed the country of destination in cell B22, when I try to add it, the counting of the labels is not workgin anymore would you mind adding it in the VBA??
    Mya last request, if I may, would be: is there anyway to lock the file? this file will be in hands of poeple that have the habit of modifying everything without asking (for ex set up password that is disabled when macro is running ?)
    Thanks a lot for helping me
    I wish you a very nice day
    Pierre
    Attached Files Attached Files

  5. #5
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,055

    Re: automatically create label

    If I choose an incorrect value in the dop down menu
    What do you mean by "an incorrect value"? Please give me an example of an incorrect value. The values in the drop down in E3 should all be in column A of Process order. Do you want to protect all the sheets from being modified or just some of them?

  6. #6
    Registered User
    Join Date
    04-19-2010
    Location
    belgium
    MS-Off Ver
    Office 365
    Posts
    53

    Re: automatically create label

    hello Mumps1

    In fact the value was in the drop down but not in the LOVs values
    concerning the protection it would be (if possible) all the sheets

    i tried to add the country of destination myself but i am not good enough would you mind checking this also please revised form is attached in my previous comment

    thanks again !
    best regards
    Guismo30

  7. #7
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,055

    Re: automatically create label

    Are you saying that the Material Number is not in the LOVs sheet? If this is the case, what do you want to do if the Material Number is not found in LOVs?

  8. #8
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,055

    Re: automatically create label

    The attached file includes the country and sheet protection. The current password is "Password". Change this to suit your needs on line 16 of the macro in the worksheet code module and on line 5 in the macro in the ThisWorkbook code module. I'll wait for your response to my question in Post #7.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    04-19-2010
    Location
    belgium
    MS-Off Ver
    Office 365
    Posts
    53

    Re: automatically create label

    Good morning Mumps1
    this is exactly what i need it is sooo kind of you ! thanks very much..
    to your question when the product is not in the LOV, if we can get a popup or something like this
    but I think I have asked you enough thanks again for this perfect work !!
    best regards
    guismo

  10. #10
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,055

    Re: automatically create label

    You are very welcome.
    Try this version of the macro in the worksheet code module and see if it fixes the problem of the material number not being in the LOVs sheet.
    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    04-19-2010
    Location
    belgium
    MS-Off Ver
    Office 365
    Posts
    53

    Re: automatically create label

    Quote Originally Posted by Mumps1 View Post
    You are very welcome.
    Try this version of the macro in the worksheet code module and see if it fixes the problem of the material number not being in the LOVs sheet.
    Please Login or Register  to view this content.
    Hello Mumps1

    this is it it works perfectly and now i do not have to restart all my excel sheets anymore
    last question.. when I try to print out, labels are shifted and i have half of it printing... would you have solution for this ?

    I have attached a screenshot for your perusal

    Thanks again for all you did for me

    Regards
    Guismo30
    Attached Images Attached Images

  12. #12
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,055

    Re: automatically create label

    Try the attached file.
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    04-19-2010
    Location
    belgium
    MS-Off Ver
    Office 365
    Posts
    53

    Re: automatically create label

    Quote Originally Posted by Mumps1 View Post
    Try the attached file.
    hello, i am sorry, it does not seems to solve the problem (before bothering you with all my questions, I tried to reduce the lines between the labels).. is there any way to add a line in the vba that it should copy/past at the "next page" ?
    thank you and regards
    Guismo30
    Attached Images Attached Images

+ 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. How to Automatically Updated Data & Day in label Caption
    By Sanjibghosh in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-17-2016, 08:04 AM
  2. How to convert a label to number automatically
    By thalybp in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-07-2015, 10:23 PM
  3. With a move label macro, prevent label from moving onto another label
    By SocratesJC in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-09-2014, 12:34 AM
  4. [SOLVED] Automatically fill and print DYMO label
    By Bax in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-18-2013, 07:03 AM
  5. Changing X axis label range automatically and Create line for today
    By aaslezak in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 06-26-2013, 01:01 PM
  6. Automatically add new row each day with the date label in column A
    By smockpuv in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-20-2013, 09:56 AM
  7. Making a formula to automatically fill a label
    By Cretage in forum Excel General
    Replies: 7
    Last Post: 06-09-2009, 09:49 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