+ Reply to Thread
Results 1 to 4 of 4

How to call a Macro at each instance of "For Loop"

  1. #1
    Registered User
    Join Date
    01-12-2014
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    77

    How to call a Macro at each instance of "For Loop"

    Hi Friends,

    In cell A1 I need to enter value 1 to 50 one by one and call another macro after entering each number. So I am using For loop for this task. But not sure how to integrate both macros.
    I could only put up the following. How to make this work.

    Please Login or Register  to view this content.
    Thanks,
    Laxman

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,009

    Re: How to call a Macro at each instance of "For Loop"

    .
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    01-12-2014
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    77

    Re: How to call a Macro at each instance of "For Loop"

    The macro being called is running only once. But is supposed to run 50 times. That is when value is 1 in cell A1 then macro should be run. And again when value is 2, macro should run, next after the value is 3 macro should run and so on so forth.

  4. #4
    Registered User
    Join Date
    01-12-2014
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    77

    Re: How to call a Macro at each instance of "For Loop"

    Thank you very much Logit. This helped.

+ 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. I am getting this error by below macro "Invalid procedure call arguement" please help
    By shoaibaligwl in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-06-2017, 09:39 AM
  2. [SOLVED] Protecting worksheet but allowing "forms" button to still call a macro
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-28-2014, 05:58 PM
  3. [SOLVED] Jumping to the macro from the "Call" line while viewing the code
    By Alexander_Golinsky in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-13-2013, 05:23 AM
  4. [SOLVED] How do I "call" a macro as part of an 'if' statement
    By Dragman in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-15-2013, 06:25 PM
  5. "Invalid Call or Argument" in While Loop using MyFile = Dir
    By rogerdavid in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-20-2013, 02:18 AM
  6. Macro that simulates a "call ticker" for sales
    By hysterical.useless in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-25-2012, 12:34 AM
  7. Call a sub statement in "Personal Macro Workbook" from "ThisWorkbo
    By QC Coug in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-26-2005, 03:05 PM

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