Consulting

Page 1 of 2 1 2 LastLast
Results 1 to 20 of 30

Thread: Solved: Copy between sheets

  1. #1

    Angry Solved: Copy between sheets

    Hi,I am trying to copy information from one worksheet to another, and the code I would normally use doesn't seem to be working. I've broken the code down to see where it is going wrong, and I'm down to the bare minimum. This is how my code looks:[vba]Sub Transfer()Sheets("FundsOutList").SelectRange("A30").End(xlUp).Offset(1, 0).SelectEnd Sub[/vba]
    But when I run the macro a messagebox appears that just says '400'!!Any ideas what's going on?

    Edit by Lucas: I added vba tags to your code for easier reading
    We're a Kingdom, and we're United!!

  2. #2
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    Hi, it is difficullt to ascertain what is wrong, can you post a copy of your Workbook, with some dummy data if necessary so we can see what is going wrong?

  3. #3
    For some reason what I assume is the attach file button isn't working! Can't even press it
    We're a Kingdom, and we're United!!

  4. #4
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    At the bottom left corner of this page what does it say your posting rules are?
    Do you want to email me a copy, if so I will send my email address in a private mail.

  5. #5
    You may post new threadsYou may post repliesYou may post attachmentsYou may edit your postsvB code is OnSmilies are On[IMG] code is OnHTML code is Off
    We're a Kingdom, and we're United!!

  6. #6
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    That says you shouldn't have a problem then, very odd.
    What about emailing?

  7. #7
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    Click on "Post Reply" on the left side of the last post....after typing your post scroll the page down and look for the button that says "Manage Attachments"
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  8. #8
    Nope...there is nothing that says "Manage Attachments" after clicking Post Reply.Under additional options it has a section just called "Attach Files", but only says the valid file extensions.I can email though. Tried doing a PM, but couldn't attach anything there either.
    We're a Kingdom, and we're United!!

  9. #9
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    Directly under where you write your post there is a "Go Advanced" button, did you click that?

  10. #10
    Yep...still nothing
    We're a Kingdom, and we're United!!

  11. #11
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    OK, I will private mail you.

  12. #12
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    If you can get with OBP and email it to him, maybe he can post it for you and I will bring your problem to the attention of an admin and see if your permissions are set wrong......
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  13. #13
    Great...thanks all! I have just emailed it to OBP
    We're a Kingdom, and we're United!!

  14. #14
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    Ok, the first thing is that you do not have any error handling routine to tell you what the error is. I will dig a bit deeper and post it back on here

  15. #15
    Excellent, thanks
    We're a Kingdom, and we're United!!

  16. #16
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    The failure is in trying to select the various ranges, the VBA does not like the way that you are trying to do it. I think I will have to break down your current range statements to see what is triggering the error.

  17. #17
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    Right in the "Test" macro you are not selecting the "Lists" sheets before trying to select the range. Use this
    Sheets("Lists").Select
    Range("A65000").End(xlUp).Select
    Range(Selection, Selection.End(xlUp)).Select

  18. #18
    I tried running just 1 line of code on the "FundsOutList" sheet that said Range("A30").Select and it didn't like it. Try running it on the "FundsOut" sheet and it works fine
    We're a Kingdom, and we're United!!

  19. #19
    Sorry...I am running the "Transfer" macro which is what is linked to the button on the "FundsOut" sheet.
    We're a Kingdom, and we're United!!

  20. #20
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    Same on the Named range macro.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •