A macro that won't run

Solved
christophedir Posted messages 201 Status Member -  
christophedir Posted messages 201 Status Member -
Hello,
I'm coming back with an old post because I have an issue with a macro.
Attached is the file.
http://www.cjoint.com/c/GKvib2LyrmF
There is a tab called "model anomaly"; by clicking on the button "create a new report", a new tab is created in the attached file "anomaly 6-17". Once we've finished filling out the report, we click on "finalize entry" and that's where the macro doesn't work.

I don't know much about macros, and I would like to have some explanations about the issue if possible.

Thank you.

Christophed

9 answers

  1. f894009 Posted messages 17417 Registration date   Status Member Last intervention   1 717
     
    Hello,

    Without code for the button, it's not easy, look:

    '?????????????????????????????????????????? Private Sub CommandButton1_Click() new End Sub Private Sub CommandButton2_Click() ActiveSheet.Shapes("CommandButton2").Select Selection.Cut ActiveSheet.Copy End Sub 'FINALIZE THE ENTRY Private Sub CommandButton3_Click() End Sub
    0
  2. christophedir Posted messages 201 Status Member
     
    Hello f894009,
    I'm sorry but nothing works,
    when I look at the original file, I have the following macro:
    Private Sub CommandButton1_Click()
    new
    End Sub

    Private Sub CommandButton2_Click()
    ActiveSheet.Shapes("CommandButton2").Select
    Selection.Cut
    ActiveSheet.Copy
    End Sub

    which is not the same as the file I sent you???

    I'm lost

    christophed
    0
    1. f894009 Posted messages 17417 Registration date   Status Member Last intervention   1 717
       
      Hello,

      You need to include 'new' with the code for

      'FINALIZE THE ENTRY Private Sub CommandButton3_Click() new End Sub


      since the FINALIZE THE ENTRY button is CommandButton3.
      0
  3. christophedir Posted messages 201 Status Member
     
    when I put "new" in the macro, it creates a new tab with a new number

    what the "finalize entry" button should do => extract the sheet into another workbook
    0
  4. christophedir Posted messages 201 Status Member
     
    Sorry, but I should have given you the original job title:
    Have an incrementing number for each new entry

    It might be easier for you to understand the file

    christophed
    0
    1. f894009 Posted messages 17417 Registration date   Status Member Last intervention   1 717
       
      Re,
      what the "finalize the input" button should do
      Absolutely Thierry, but the code does not exist !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      0
  5. f894009 Posted messages 17417 Registration date   Status Member Last intervention   1 717
     
    Hi again,

    Absolutely Thierry, but the code does not exist and nothing in your initial request indicates what you need........................!!!!!!
    0
  6. christophedir Posted messages 201 Status Member
     
    Hello,

    I'm sorry for responding so late, I started work at 2:00 PM.
    Explanations:
    In the folder, there is a tab titled "model anomaly"; at the top of this page, there is a command button "Create a new report". This opens a new tab with a number 1/17 = 1st report of the year 2017 (incrementing as needed).

    Once the entries are made, we click on "finalize entry" to close it.
    This button should also copy the tab (e.g., 1/17) into another folder so that it can be sent by email to our service providers.
    What we need to see is why the command button for the macro "finalize entry" is not working anymore.

    I hope my explanations are helpful to you.

    Best regards,

    Christophed
    0
    1. f894009 Posted messages 17417 Registration date   Status Member Last intervention   1 717
       
      Re,
      why doesn't the "finalize entry" macro button work or not work anymore

      In your original file, there is no code for the "finalize entry" button, so where did this code go???????????????????????????????
      0
  7. christophedir Posted messages 201 Status Member
     
    Re
    I really don't know
    0
    1. f894009 Posted messages 17417 Registration date   Status Member Last intervention   1 717
       
      Re,

      Do you only have this file, no backup somewhere???
      0
  8. christophedir Posted messages 201 Status Member
     
    Hi,
    yes, I have the original file that I could revisit
    https://mon-partage.fr/f/z9i7bPiv/

    but I would like to know what might have happened and how to remedy it

    if possible.
    0
    1. f894009 Posted messages 17417 Registration date   Status Member Last intervention   1 717
       
      Re,

      Well, no better code to do what you would like.......!!!!!!!
      0
  9. christophedir Posted messages 201 Status Member
     
    Re
    yet it worked at the beginning and when I take the original file it works ?????

    Too bad, I will take the original file and redo the formatting

    thank you

    christophed
    0