Worksheet Change Syntax Troubles

Posted on 2011-10-05
Last Modified: 2012-05-12
I am trying to manually call the Worksheet_Change Subroutine.  My code looks like this...

Private Sub mySubroutine()
Call Worksheet_Change (Temp)
End Sub

Open in new window

Temp is a named range.  The error I get is "Object Required".

I have also tried things like "$A$1:$A$1" and its variations.  Here I get a type mismatch error.

I do not need the target to point to anything, I just need the subroutine to run.


Question by:randys106
    LVL 26

    Expert Comment


    Total cheat, but (assuming the sheet is "Sheet1"), what about replacing the Call line by...
    Sheets("Sheet1").Cells(1, 1).Formula = Cells(1, 1).Formula

    Open in new window

    LVL 26

    Accepted Solution

    Sheets("Sheet1").Cells(1, 1).Formula = Sheets("Sheet1").Cells(1, 1).Formula

    Open in new window


    Author Closing Comment

    Yes its a cheat...and a damn beautiful one.  I like it!  It worked perfectly.
    LVL 26

    Expert Comment

    Thanks, glad to help!

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
    Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
    This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
    This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now