Posts by Accounting_Hoyl

    Hello: I'm creating a template in which all cells must be filled out before a macro can be run. The current coding I have creates a message box anytime I click on a cell and the required cells have not been filled in. I would like for the message box only to appear after the template has been filled out so it will reveal anything the employee may have forgot to input. I tried disabling events and then re enabling them at the end but that didnt really work so Im hoping someone has ideas.

    Re: Worksheet Selection Change

    From what I understood SelectionChange fired a macro upon selecting a cell (hopefully in particular the key cell I have set). In addition, I have tried entering data into that cell and that has not worked either.


    Im currently writing a pretty simple macro where when I select a particular cell it runs a macro automatically. When I click on the target cell simply nothing happens. I have turned on events using ctrl+G and typing Application.EnableEvents = True. Here is my code and any help is welcome.

    1. Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    2. Dim KeyCell As Range
    3. Set KeyCell = Range("B43")
    4. If Target.Address = KeyCell Then
    5. Call Macro1
    6. End If
    7. End Sub

    In addition, here is the Macro1 I am trying to call:

    1. Sub Macro1()
    2. Range("d35").Select
    3. If ActiveCell<>ActiveCell.Offset(0,1) Then
    4. Range("d35:e35").Select
    5. End if