+ Reply to Thread
Results 1 to 7 of 7

Vba code does not copy data to other sheet

  1. #1
    Registered User
    Join Date
    01-16-2014
    Location
    Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    68

    Vba code does not copy data to other sheet

    My vba code to copy row A110 of "Mod" worksheet to A9 in Table A of "Email Data" worksheet using some logic like -
    in Mod worksheet it searches for data i.e. "COUNT(DISTINCTM.TRANS_ID)" if found then it searches for "row selected" and it searches for data between the two . And then it pastes 34864 to A9 of Email Data worksheet . I have written code for this but it doesn't works.

    Also i need vba code similarly for searching "CAP_ACTV_LN_SEQ" and then the values inside it to be pasted i.e. row 128 and row 129 in Mod worksheet to be pasted in table e in Email Data worksheet . Remember there are 2 rows but there can be any number of row anytime.

    Also the vba code for "NULLPOINTEREXCEPTION'" is there in the sheet which is working fine. It can be used for your reference.

    Button for Vba code to work is present in "Email Data" worksheet.

    code for "COUNT(DISTINCTM.TRANS_ID)" given below also excel sheet attached. I am very week in vba programming so any help will be great .

    Worksheet .xlsm

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Vba code does not copy data to other sheet

    first error: Dim TotalTransaction As Integer, must be long

    can you explain me the goal of this code ?
    Please Login or Register  to view this content.
    If solved remember to mark Thread as solved

  3. #3
    Registered User
    Join Date
    01-16-2014
    Location
    Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    68

    Re: Vba code does not copy data to other sheet

    I wanted to point to cell A110 which contain integer value , may be the way i do is wrong . I want something inside the loop like -
    If .Cells(j, 1) = some integer value Then TotalTransaction = .Cells(j, 1)

  4. #4
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Vba code does not copy data to other sheet

    I'm sorry, I did not understand

  5. #5
    Registered User
    Join Date
    01-16-2014
    Location
    Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    68

    Re: Vba code does not copy data to other sheet

    Can anyone help me in this. Help needed urgently.

  6. #6
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: Vba code does not copy data to other sheet

    aakhan2011,

    Cross posted here:
    http://www.mrexcel.com/forum/excel-q...eet-other.html

    A message to forum cross posters, please read the following link:
    http://www.excelguru.ca/node/7
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

  7. #7
    Registered User
    Join Date
    01-16-2014
    Location
    Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    68

    Re: Vba code does not copy data to other sheet

    Any help here will be greatly appreciated.

+ 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. VBA CODE to Copy Paster data from one sheet to other sheet on a daily basis
    By aravindkm in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-26-2013, 12:06 PM
  2. VBA Code to auto copy data from one sheet to another
    By Angnz in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-18-2013, 01:41 AM
  3. Replies: 1
    Last Post: 03-28-2013, 02:49 PM
  4. VBA code copy data from one sheet to another error
    By jcicero57 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-14-2013, 06:38 PM
  5. [SOLVED] Code to copy data from specified worksheets into one sheet
    By ZeDoctor in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-02-2012, 09:02 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