+ Reply to Thread
Results 1 to 5 of 5

How to copy last non-zero value with vba code between two excel workbook.

  1. #1
    Registered User
    Join Date
    08-25-2023
    Location
    Thailand
    MS-Off Ver
    2016
    Posts
    8

    Unhappy How to copy last non-zero value with vba code between two excel workbook.

    Hi guys, I hope you guys have a nice day. I need your help.
    Problem: I want to get last non-zero value on another workbook (E10:E40)

    Step1)Press this button in 1st workbook 1.PNG
    step2)it will open 2nd workbook
    2.PNG
    and copy last non-zero value on rank E10:E40 to 1st workbook

    this is my vba code in 1st workbook for copy last non-zero value but it doesnt work , can you guys figure it out, please.
    Capture.PNG

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: How to copy last non-zero value with vba code between two excel workbook.

    moved to VBA sub-forum
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,206

    Re: How to copy last non-zero value with vba code between two excel workbook.

    Try

    Please Login or Register  to view this content.
    Last edited by JohnTopley; 08-31-2023 at 09:42 AM.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  4. #4
    Registered User
    Join Date
    08-25-2023
    Location
    Thailand
    MS-Off Ver
    2016
    Posts
    8

    Re: How to copy last non-zero value with vba code between two excel workbook.

    Oh, It's worked but what if I want to copy that value than show with MsgBox what's VBA code should be?

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: How to copy last non-zero value with vba code between two excel workbook.

    Different method, no need to open source workbook.
    Please Login or Register  to view this content.

+ 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] vba code to copy a specific sheet from a closed workbook to the active workbook
    By JEAN1972 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-01-2017, 03:09 AM
  2. VBA code to copy From MS outlook to excel workbook
    By aravindkm in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-13-2015, 04:33 AM
  3. VBA code to copy data from current workbook to another workbook and send email
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-05-2015, 06:47 AM
  4. [SOLVED] VBA - Excel code to copy and paste from several Sharepoint workbook files to one workbook
    By TraceyPatterson in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-27-2015, 06:45 AM
  5. Replies: 0
    Last Post: 07-12-2013, 05:29 PM
  6. copy data from one excel workkbook to another workbook using VBA code
    By jaidena in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-11-2012, 09:07 AM
  7. Code to open a workbook , copy info and return it to another workbook using a cell v.
    By england79m in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-31-2008, 11:22 AM

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