+ Reply to Thread
Results 1 to 5 of 5

Macro not working excel 2016

  1. #1
    Registered User
    Join Date
    02-04-2018
    Location
    Virginia, USA
    MS-Off Ver
    Excel 2010
    Posts
    8

    Macro not working excel 2016

    Hello,

    I have a code that I want to use
    Please Login or Register  to view this content.
    However when I put it int excel, the code will show up under my workbook or sheet, however it will not be found when I try to run it.

    I noticed that when I take away the text between () that it shows up but I need the (ByVal Target As Range) to work

    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
    Last edited by 6StringJazzer; 02-05-2018 at 01:39 PM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,758

    Re: Macro not working excel 2016

    If a macro has parameters you cannot run it from the Run Macro dialog because there is no way for you to provide the parameter values. It has to be called by other code.

    In the case of Worksheet_SelectionChange, it is automatically called by VBA every time you select another cell on that worksheet.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    02-04-2018
    Location
    Virginia, USA
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Macro not working excel 2016

    Hello,

    Where would I run this code then? I am very new to this.

  4. #4
    Forum Expert
    Join Date
    10-02-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    1,222

    Re: Macro not working excel 2016

    2 parts here.

    As mentioned, if the code is Event code or has parameters you cannot run it manually. Also a private sub or function will not show in the macros dialog to run.

    What is it you are trying to do with the code, whats your goal?
    Ways to get help: Post clear questions, explain your overall goal, supply as much background as possible, respond to questions asked of you by those trying to help and post sample(s) files.

    "I am here to help, not do it for people" -Me

  5. #5
    Registered User
    Join Date
    02-04-2018
    Location
    Virginia, USA
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Macro not working excel 2016

    Thank you Zer0Cool! I actually got it working. However, I ran into one more small issue with my overall goal.

    I trade currencies/Forex and I am working on plotting the co integration of two currency pairs. Basically I want to continually add the most recently FX prices but keep the number of cells constant. I only
    want 2 days worth of 1 minute date, or the most recent 2880 1 min prices. I already have an automatic feed into my excel that updates my prices. However, if for example I use the code and I input a price into cell 5, that price will stay
    and the first price in the series will be deleted, and it will continue like that so my prices are always the 5 most recent. However now when I add a formula to cell A5 to be = to the cell that has my automatic price update it will update once
    but then the price moves up like it should and the formula disappears making my automatic update worthless.

+ 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. Add-in not working in Excel 2016
    By poultje in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-10-2017, 07:11 AM
  2. Replies: 1
    Last Post: 09-18-2017, 08:27 AM
  3. 2010 Macro not working in 2016 Excel
    By porepiga in forum Excel General
    Replies: 7
    Last Post: 04-18-2017, 12:11 PM
  4. dlg macro not working on 2016
    By culebrasx in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-29-2016, 11:43 AM
  5. Replies: 0
    Last Post: 05-17-2016, 12:39 PM
  6. Macro From Excel 2013 Not Working in 2016
    By tm1238 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-08-2016, 04:39 PM
  7. Excel 2016 15.17 on Mac - Controls not working
    By MRock in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 2
    Last Post: 01-07-2016, 08:50 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