Results 1 to 2 of 2

Thread: How to copy VBA macro to another worksheet

  1. #1
    Acolyte Beddy Boy's Avatar
    Join Date
    Feb 2017
    Posts
    34
    Articles
    0
    Excel Version
    Excel 365

    How to copy VBA macro to another worksheet



    Register for a FREE account, and/
    or Log in to avoid these ads!

    Hi,

    I wonder if anyone can help. I've been trying for 2 weeks on this to no avail as have limited programming experience.

    I have a worksheet that functions OK in accessing an api of an website using a button and macro. I copied this macro from another worksheet - I tried copy/past, import/export etc. The macro copies fine and works except the original file/worksheet continually opens whenever I run the macro....

    Is there anyway of preventing this?

    Thanks in advance.

    Wayne

  2. #2
    Magician NoS's Avatar
    Join Date
    Jan 2013
    Location
    British Columbia
    Posts
    792
    Articles
    0
    Excel Version
    Excel 2010
    Without seeing your macro would guess something in it refers back to the original file/worksheet.
    Use the F8 key to step through the macro a line at a time and see at what point this happens.

Posting Permissions

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