Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7927577
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T19:22:47+00:00 2026-06-03T19:22:47+00:00

I am writing a macro where there is a central input sheet – let

  • 0

I am writing a macro where there is a central input sheet – let us call this sheet – “Main Input sheet” where user inputs the variables concerned. In the “Main Input sheet” there are some inputs say – “Any More Input sheets?” – which when “Yes”, a worksheet corresponding to the input is displayed (it was previously hidden) – Lets call it “Associated Input sheet”. Now, I want to ensure that the user updates “Associated Input sheet” before he runs the macro. Is there a way I can do this – using event handlers that VBA provides or using any other way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T19:22:48+00:00Added an answer on June 3, 2026 at 7:22 pm

    There is a Worksheet_change event that would probably do what you want:

    Private Sub Worksheet_Change(ByVal Target As Range)
    
    End Sub
    

    Place this in the code for the “Main Info Sheet” and it will run everytime the sheet is changed.

    However, if you don’t want the spreadsheet to run every single time the sheet is updated, but only want to check if it has been updated… what you can do is create a global variable like this (the declaration must be placed in a standard module:

    Global MainSheetHasChanged as Boolean
    

    Then you would simply put this line of code in the worksheet_changed macro:

    Private Sub Worksheet_Change(ByVal Target As Range)
        MainSheetHasChanged = True
    End Sub
    

    Just make sure to always set the variable back to false after running your other macro. Is this what you’re looking for?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have started writing a Macro in Visual Studio 2005 like this: Public Sub
I'm writing a macro to let me replace the spaces in a string in
I'm writing a Word/VBA macro for a document template. Every time a user saves/creates
i have a loop in a macro i'm writing of the following structure: there
I am writing a macro in Excel where I need to get a substring
I am writing a macro in MS Word which should find all highlighted text
I'm writing a macro that will click certain spots on the screen when I
I am writing a macro that converts a list of names that are in
I'm writing an Excel macro , and I'm having trouble clearing a Scripting.Dictionary object
I'm writing a macro, but because I'm working for first time in vb, I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.