+ Reply to Thread
Results 1 to 9 of 9

Application.run Not working (Stepping Over with no Error Message)

  1. #1
    Forum Contributor
    Join Date
    04-11-2017
    Location
    Edinburgh, Scotland
    MS-Off Ver
    2010
    Posts
    110

    Application.run Not working (Stepping Over with no Error Message)

    Hi

    I have the below line of code within a module of a workbook and my aim is to run the DiscrepancyFormatting macro within the Daily Template workbook which is also open however nothing happens when I run the macro or step through this line of code. I don't receive an error message either.

    Please Login or Register  to view this content.
    Has anyone come across this before?

    Thanks in advance

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Application.run Not working (Stepping Over with no Error Message)

    Hi,

    Do you perchance have an On Error Resume Next statement in your code?
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Forum Contributor
    Join Date
    04-11-2017
    Location
    Edinburgh, Scotland
    MS-Off Ver
    2010
    Posts
    110

    Re: Application.run Not working (Stepping Over with no Error Message)

    As a matter of fact, there is yes. The original code was actually written by someone else which I am now tweaking.

    Have just taken that off 'On Error Resume Next' off and I am now getting a Run-time error 1004 message: Cannot run the macro "Daily Template.xlsm'!DiscrepancyFormatting'. The macro may not be available in this workbook or all macros may be disabled.

    Any advice on that appreciated.
    Last edited by stevoDE; 10-25-2017 at 05:51 AM.

  4. #4
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Application.run Not working (Stepping Over with no Error Message)

    Which module is the DiscrepancyFormatting code in in the Daily Template workbook?

  5. #5
    Forum Contributor
    Join Date
    04-11-2017
    Location
    Edinburgh, Scotland
    MS-Off Ver
    2010
    Posts
    110

    Re: Application.run Not working (Stepping Over with no Error Message)

    Sorry for the late reply on this xlnitwit.

    The issue was due to the fact that I had renamed the macro within the VBEditor so in order for it to run, I had to amend the code to:

    Please Login or Register  to view this content.
    Quite annoying! Not sure if there's any easy way around having to reference the name twice.

  6. #6
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Application.run Not working (Stepping Over with no Error Message)

    Yes- simply don't use the same name for the module and the routine.

  7. #7
    Forum Contributor
    Join Date
    04-11-2017
    Location
    Edinburgh, Scotland
    MS-Off Ver
    2010
    Posts
    110

    Re: Application.run Not working (Stepping Over with no Error Message)

    And then just refer to the name of the routine and it should run?

  8. #8
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Application.run Not working (Stepping Over with no Error Message)

    Yes it would just be
    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    04-11-2017
    Location
    Edinburgh, Scotland
    MS-Off Ver
    2010
    Posts
    110

    Re: Application.run Not working (Stepping Over with no Error Message)

    Got it, thanks very much!

+ 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. Replies: 0
    Last Post: 03-23-2016, 10:49 AM
  2. [SOLVED] Error message: Run-Time error '1004 '; application-defined or object-defined error
    By Davasu in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-23-2015, 06:52 AM
  3. Replies: 1
    Last Post: 10-22-2015, 05:50 AM
  4. blank error message breaking VBA until application re-start
    By Leon V (AW) in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-11-2014, 06:28 AM
  5. [SOLVED] No error message but Code not working
    By mukeshbaviskar in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-19-2013, 01:12 PM
  6. Error message with application get open filename
    By leanne2011 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 12-21-2011, 06:07 AM
  7. Working application - Now generates error
    By Madiya in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-24-2005, 07:38 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