+ Reply to Thread
Results 1 to 11 of 11

How can I have a macro automatically run when a certain cell is filled in?

  1. #1
    Registered User
    Join Date
    06-22-2012
    Location
    areadua TRON
    MS-Off Ver
    Excel 2007
    Posts
    14

    How can I have a macro automatically run when a certain cell is filled in?

    Hello, I don't know anything about VBA, but I did manage to record my first few helpful macros. But I would very much like to learn how to have a macro run automatically once a certain cell is filled in. How can I do this?
    Last edited by thejayjetson; 06-22-2012 at 03:46 PM. Reason: left out word

  2. #2
    Valued Forum Contributor
    Join Date
    10-21-2011
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    513

    Re: How can I have a macro automatically run when a certain cell is filled in?

    Hi,

    I like your idea.

    You can say something like....if the activecell has content in it, then invoke a macro.

    I think this is totally possible. But if you have a dummy workbook you can post, it would be helpful.

    Lifeseeker

  3. #3
    Registered User
    Join Date
    06-22-2012
    Location
    areadua TRON
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: How can I have a macro automatically run when a certain cell is filled in?

    IClaim.xlsm

    Thanks for the awesomely quick reply.

    I want to learn how to run any macro automatically when whatever cell i designate is filled in. But for my first learning purposes, if B3 is filled in then I want to have my ctrl+t macro run automatically.
    Last edited by thejayjetson; 06-22-2012 at 04:03 PM. Reason: Upload was correct-no need to ask

  4. #4
    Registered User
    Join Date
    06-20-2012
    Location
    PA
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: How can I have a macro automatically run when a certain cell is filled in?

    try this solution
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    06-22-2012
    Location
    areadua TRON
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: How can I have a macro automatically run when a certain cell is filled in?

    Well, that obviously works. Bravo. But how in the heck did you possible do this? I really want to learn.

  6. #6
    Registered User
    Join Date
    06-20-2012
    Location
    PA
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: How can I have a macro automatically run when a certain cell is filled in?

    just press All+f111 and open sheet1 module to look at the code

  7. #7
    Registered User
    Join Date
    06-22-2012
    Location
    areadua TRON
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: How can I have a macro automatically run when a certain cell is filled in?

    I see:

    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Cells.Row = 3 And Target.Cells.Column = 2 Then
    Call Dateandtime
    End If
    End Sub

    But how did you input this?

  8. #8
    Registered User
    Join Date
    06-20-2012
    Location
    PA
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: How can I have a macro automatically run when a certain cell is filled in?

    manually, you can not write macro like this just hitting button - record macro

  9. #9
    Registered User
    Join Date
    06-22-2012
    Location
    areadua TRON
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: How can I have a macro automatically run when a certain cell is filled in?

    How do you manually do it? I don't just want the work done for me. I want to learn what you did to make it work.

  10. #10
    Registered User
    Join Date
    06-22-2012
    Location
    areadua TRON
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: How can I have a macro automatically run when a certain cell is filled in?

    What about you Lifeseeker, do you where to put the code I copied from Power?

  11. #11
    Registered User
    Join Date
    06-22-2012
    Location
    areadua TRON
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: How can I have a macro automatically run when a certain cell is filled in?

    Come on. There must be someone here that knows how to do this???????

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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