+ Reply to Thread
Results 1 to 4 of 4

Issue With Executing Macros Within Macro, If Statement

  1. #1
    Registered User
    Join Date
    08-23-2016
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    17

    Issue With Executing Macros Within Macro, If Statement

    Hello guys, new member and first post, come to you with a question. As you can see from the code below, we are executing a macro that then executes one of two possible macros after determining if today's date matches the date in another location. I have posted the errors as well as the highlighted bit of code it doesn't like. I get the feeling this is about syntax but I'm not sure.

    "Compile error: Wrong number of arguments or invalid property assignment"
    Highlights Then portion of code

    Please Login or Register  to view this content.
    Attached Images Attached Images

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Issue With Executing Macros Within Macro, If Statement

    Why the [] and () for Application.Run?

    Does the code work if you remove them?
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Issue With Executing Macros Within Macro, If Statement

    May be
    Please Login or Register  to view this content.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  4. #4
    Registered User
    Join Date
    08-23-2016
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    17

    Re: Issue With Executing Macros Within Macro, If Statement

    Quote Originally Posted by Norie View Post
    Why the [] and () for Application.Run?

    Does the code work if you remove them?
    Please Login or Register  to view this content.
    Thank you for this. Worked perfectly. I appear to have completely misunderstood the proper syntax. I tend to add parenthesis and brackets everywhere apparently...

+ 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. [SOLVED] Custom Ribbon not executing macros
    By neddyseagoon in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-15-2019, 01:34 PM
  2. [SOLVED] Macro Ends Sub After Executing If Statement
    By pranskius in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-28-2014, 02:30 PM
  3. Executing macros across multiple worksheets
    By troth in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-18-2011, 02:10 AM
  4. [SOLVED] executing macros upon opening xls files
    By dr chuck in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-04-2006, 04:10 PM
  5. [SOLVED] Executing Macros
    By bmorganh in forum Excel General
    Replies: 1
    Last Post: 01-26-2006, 08:10 PM
  6. Executing of excel Macros.
    By KarthikK in forum Excel General
    Replies: 4
    Last Post: 06-28-2005, 07:00 AM
  7. [SOLVED] Auto-Executing Macros
    By LyndieBee in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-15-2005, 12:06 AM

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