+ Reply to Thread
Results 1 to 9 of 9

Makro in Background

  1. #1
    Registered User
    Join Date
    02-20-2011
    Location
    Germany
    MS-Off Ver
    Excel 2007
    Posts
    7

    Makro in Background

    Greetings,

    is it possible to start a makro when opening a document and let in run in the background all the time?
    Last edited by Eich; 08-05-2013 at 02:43 AM.

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Makro in Background

    Hello Eich,

    Most Macros run in the background all the time.

    If you could upload a sample WorkBook of your requirements, we may be able to assist you.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,464

    Re: Makro in Background

    The event handlers run all the time if you have established them.

    You'd use a worksheet change event to cope with the original problem. If A1 is changed, check A2 and A3. If both are empty, exit. If one has a value, put the total in the other one. Repeat code for A2 and A3..

    My initial thoughts anyway ... But now you've changed the title and the content, maybe that's not what you want.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    02-20-2011
    Location
    Germany
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Makro in Background

    Sorry for the change of title and content, I thought I figured out the solution, but as it turns out, I did not. Exactly because I do not know how to check for a change of a cell. Basically I want to do this, but less dumb and in realtime:

    TestNeu.xlsm

    Thanks

  5. #5
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Makro in Background

    Maybe the attached Workbook is what you want.

    Also see the "Please consider" note at the bottom of this post.
    Attached Files Attached Files

  6. #6
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Makro in Background

    I forgot to mention that although your Sub Sum Macro might need attention, as it would appear to me, I did not change it, since you may have a reason for having set it up that way.

  7. #7
    Registered User
    Join Date
    02-20-2011
    Location
    Germany
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Makro in Background

    Well, not exactly. For one, it doesn't work properly. It continues to sum up everything and produces an error on startup. I would prefer to alter my code in a way it works in realtime. Because it is easy to understand and stops when it has to. I'm sure the solution has something to do with this:

    Please Login or Register  to view this content.
    But I just don't know enough about the syntax to get it working in a timely fashion.

  8. #8
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Makro in Background

    Do you experience the same problem with the WorkBook I have provided you with?

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,464

    Re: Makro in Background

    Sorry, I've been busy ... but can I just say that choosing "Sum" as the name of a VBA routine is a really bad choice. "Sum" is an Excel/VBA reserved word for an Excel function so you might experience some conflict.

    Whatever, it's bad practice and I would suggest that you change it.


    You could perhaps use the following worksheet change event:

    Please Login or Register  to view this content.


    Regards, TMS

+ 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: 4
    Last Post: 07-12-2013, 12:14 PM
  2. [SOLVED] Inserting IF Function and depending on answer have cell populate with another cell.
    By Rhiannon25 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 04-03-2013, 02:17 AM
  3. Replies: 0
    Last Post: 02-01-2013, 09:26 PM
  4. Replies: 3
    Last Post: 11-21-2012, 03:28 PM
  5. Replies: 2
    Last Post: 07-24-2012, 11:47 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