+ Reply to Thread
Results 1 to 7 of 7

Having problems with this one...

  1. #1
    Registered User
    Join Date
    07-15-2015
    Location
    Dordrecht, Holland
    MS-Off Ver
    2013
    Posts
    8

    Having problems with this one...

    Hi everybody, I just created this macro to copy and paste generated data that fluctuates a lot, but it just doesn't work very good...
    Every time i activate it, i get a paste error and i get infinite zeros after the data, any suggestions on this one?

    Sub Macro1()


    Application.ScreenUpdating = False
    'IO
    Sheets("Hulp_IO").Select
    Range("A1").Select
    Range(Selection, Selection.End(xlDown)).Select
    Selection.Copy
    Sheets("IO").Select
    Range("B2").Select
    On Error Resume Next
    ActiveSheet.Paste Link:=True
    On Error GoTo 0
    Range("B2").Select
    'Modbus_Lees_Tags_PMSX
    Sheets("Hulp_Modbus_PMSX_Lees_Tags").Select
    Range("A1").Select
    Range(Selection, Selection.End(xlDown)).Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Modbus_Lees_Tags_PMSX").Select
    Range("D2").Select
    On Error Resume Next
    ActiveSheet.Paste Link:=True
    On Error GoTo 0
    Range("D2").Select
    'Modbus_Schrijf_Tags_PMSX
    Sheets("Hulp_Modbus_PMSX_Schrijf_Tags").Select
    Range("A1").Select
    Range(Selection, Selection.End(xlDown)).Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Modbus_Schrijf_Tags_PMSX").Select
    Range("D2").Select
    On Error Resume Next
    ActiveSheet.Paste Link:=True
    On Error GoTo 0
    Range("D2").Select
    'Modbus_Lees_Tags_PackScan
    Sheets("Hulp_Modbus_Pakscan_Lees_Tags").Select
    Range("A1").Select
    Range(Selection, Selection.End(xlDown)).Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Modbus_Lees_Tags_PackScan").Select
    Range("A2").Select
    On Error Resume Next
    ActiveSheet.Paste Link:=True
    On Error GoTo 0
    Range("A2").Select
    'Modbus_Schrijf_Tags_PackScan
    Sheets("Hulp_Modbus_Pakscan_Schrijf_Tag").Select
    Range("A1").Select
    Range(Selection, Selection.End(xlDown)).Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Modbus_Schrijf_Tags_PackScan").Select
    Range("A2").Select
    On Error Resume Next
    ActiveSheet.Paste Link:=True
    On Error GoTo 0
    Range("A2").Select
    Sheets("Start").Select

    End Sub
    Last edited by nitozinho; 07-15-2015 at 07:09 AM.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Having problems with this one...

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title go to your first post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

  3. #3
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Having problems with this one...

    And while you are at it add code tags to your code as per forum rules

  4. #4
    Forum Contributor
    Join Date
    03-10-2013
    Location
    Budapest, Hungary
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: Having problems with this one...

    Hi!

    Do you think something like this?

    The Forum leaders are going to close your theme again, if you do not listen to them.

    I suggest again that describe your problem in text but even better when you give an example in a file attachment

    regards Pan314

  5. #5
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Having problems with this one...

    If OP hasn't answered after 5 months, he probably found an answer elsewhere...

  6. #6
    Registered User
    Join Date
    07-15-2015
    Location
    Dordrecht, Holland
    MS-Off Ver
    2013
    Posts
    8

    Re: Having problems with this one...

    Thanks for the answer, it works perfect!

  7. #7
    Forum Contributor
    Join Date
    03-10-2013
    Location
    Budapest, Hungary
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: Having problems with this one...

    Quote Originally Posted by nitozinho View Post
    Thanks for the answer, it works perfect!

    If this is all right, mark the thread as solved.
    .
    If you later decide that you will have problems on this thread you can write personal messages to me. I'll help if I have time.

    Sincerely Pan314

    - Reminder:To thank takes only a second or two. Here below click the little star (* Reputation) If you think the answer it deserves.

+ 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. Problems with IF
    By JakeMann in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-24-2013, 11:40 AM
  2. sum if problems
    By kempy in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 08-06-2013, 02:06 PM
  3. No Problems just saying hello.
    By mrkjones486 in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 07-05-2013, 11:22 AM
  4. [SOLVED] Problems with sorting andf Pivot Table problems
    By Saturn in forum Excel General
    Replies: 4
    Last Post: 10-07-2012, 07:47 AM
  5. Replies: 0
    Last Post: 12-25-2011, 04:30 PM
  6. VBA problems
    By mqdias in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-26-2006, 12:12 PM
  7. 2 Problems; need Help!!
    By xrailbank in forum Excel General
    Replies: 1
    Last Post: 12-18-2006, 11:14 PM
  8. More problems
    By John21 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-10-2006, 03:30 PM

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