+ Reply to Thread
Results 1 to 9 of 9

Need help, Code use to work but now it does not, No error just no data transfered

  1. #1
    Forum Contributor
    Join Date
    04-15-2012
    Location
    California, USA
    MS-Off Ver
    Microsoft 365 Subscription
    Posts
    120

    Need help, Code use to work but now it does not, No error just no data transfered

    I have 2 workbooks Active Orders and Completed Orders. The Active Orders Workbook has code to search through the entries and find all the rows with Shipped in Column B. Once it finds them, they are placed in an Array and transferred to the next empty row in the Completed Orders file then deletes the record in the Active Orders WB and inserts new Rows to keep the table with 80 rows. This code was working at one time, I am not the user so I don't know when it stopped working. Now when you push the button it runs through and deletes the rows making the user think that everything had transferred, but when the Completed Orders WB is opened we find that the data was not transferred. I am not sure if it has anything to do with an upgrade in the company to Excel 2016, I know when I wrote the code in Excel 2013 it worked fine. Any help would be greatly appreciated.

    Please note the code below has some commented out sections because this file lives in a SharePoint environment and I copied the file to my desktop to try testing and debugging.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Need help, Code use to work but now it does not, No error just no data transfered

    I would suggest you to comment this line of code so you can see if any problems occur.
    Please Login or Register  to view this content.
    Actually, you have no means of knowing if something went wrong with your macro while opening or saving your completed workbook.
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  3. #3
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MSO Home and Business 2024
    Posts
    7,256

    Re: Need help, Code use to work but now it does not, No error just no data transfered

    Also rewritten your lenghty parts of code.

    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  4. #4
    Forum Contributor
    Join Date
    04-15-2012
    Location
    California, USA
    MS-Off Ver
    Microsoft 365 Subscription
    Posts
    120

    Re: Need help, Code use to work but now it does not, No error just no data transfered

    Ok, so I commented out the Display Alerts, (not sure why I did not notice that originally) and I shortened the code thanks for the help on that. So the code is stalling out at the following line and I don't know why. Any ideas?

    Please Login or Register  to view this content.

  5. #5
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Need help, Code use to work but now it does not, No error just no data transfered

    really hard to tell without your workbook.

  6. #6
    Forum Contributor
    Join Date
    04-15-2012
    Location
    California, USA
    MS-Off Ver
    Microsoft 365 Subscription
    Posts
    120

    Re: Need help, Code use to work but now it does not, No error just no data transfered

    Ok, I have attached both the Active and Completed Orders workbooks. The Active Orders workbook contains the code. When a date is entered into the Actual Ship Date column the Status column gets set to "Shipped". We press the Transfer Shipped Lines button to search for and transfer everything that has shipped.

    Currently the Active Orders file has over 200 lines in it and we have shipped up to 60 lines in a day. So this was very helpful when it was working. The primary users did not tell me when it stopped working.

  7. #7
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MSO Home and Business 2024
    Posts
    7,256

    Re: Need help, Code use to work but now it does not, No error just no data transfered

    The only time I could get your code to stall is when the button is pressed without any Shipped lines present.
    To compensate this add following line
    Please Login or Register  to view this content.
    just under
    Please Login or Register  to view this content.
    The bottom of your code looks like this then.
    Please Login or Register  to view this content.
    Otherwise code runs as expected to me.

  8. #8
    Forum Contributor
    Join Date
    04-15-2012
    Location
    California, USA
    MS-Off Ver
    Microsoft 365 Subscription
    Posts
    120

    Re: Need help, Code use to work but now it does not, No error just no data transfered

    Thanks bakerman2, I am not sure what happened or why it wasn't working, but like you said it is working fine now. Thanks everyone for the help.

  9. #9
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MSO Home and Business 2024
    Posts
    7,256

    Re: Need help, Code use to work but now it does not, No error just no data transfered

    You're welcome.

+ 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. [SOLVED] Working Formula doesn't work when transfered to another sheet
    By ste67@me.com in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-01-2016, 05:07 PM
  2. [SOLVED] Data are not transfered in one sheet
    By MariaPap in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-06-2014, 08:28 AM
  3. [SOLVED] help on code transfered file move to targeted folder vba
    By breadwinner in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-09-2013, 06:42 AM
  4. [SOLVED] Not duplicating data once transfered to another sheet
    By RR2105 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-09-2013, 06:42 PM
  5. auto saving transfered data
    By seags in forum Excel General
    Replies: 2
    Last Post: 02-04-2006, 08:25 AM
  6. Saving transfered data
    By seags in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-30-2006, 09:21 PM
  7. [SOLVED] Code not working when transfered into Userform
    By ExcelMonkey in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-28-2005, 06:06 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