none
Data is not saved properly RRS feed

  • Question

  • Hi,

    Further to this thread, I want to know which line should be added inside the event, to ensure that codes would further furnish Departure List Excel with data. 

    I am clicking button Generate Departure list (within Main Sheet) to this file.

    Many Thanks & Best Regards, Hua Min

    Tuesday, March 6, 2018 9:37 AM

Answers

  • Hi HuaMin  Chen,

    You had asked,"I want to know which line should be added inside the event, to ensure that codes would further furnish Departure List Excel with data."

    It is totally depends upon your logic, and the requirement what you want to do.

    I check the code on click event of "Generate Departure list".

    I find that your code is creating the same file again and again.

    There are some code segments that are used repeatedly.

    I find that you create the file , modify the content of file and then close the file without saving anything.

    If you don't want to save anything then what is the purpose of modifying the contents of the file.

    After that, you again create a new workbook and again give the same name to it that was already created by you.

    I suggest you to first clear the logic.

    Then remove the unnecessary code from the event.

    try to add the code that you need to fulfil your requirement.

    Do not create file unnecessarily.

    Do not create multiple files with the same names.

    After getting the clear idea about the logic and the issue, You can try to debug the code step by step.

    You will find that you are using "GoTo Rep0".

    Which execute the code multiple times.

    So if it is placed by mistakenly then you can try to remove it.

    It will help you to clear some issues to generate departure list.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Jackson_1990 Wednesday, March 7, 2018 9:07 AM
    Wednesday, March 7, 2018 6:25 AM
    Moderator