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

  • Home
  • SEARCH
  • 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 9091725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T22:40:49+00:00 2026-06-16T22:40:49+00:00

When using an onchange event on some worksheet, I wish to change the Target

  • 0

When using an onchange event on some worksheet, I wish to change the Target cell’s value inside the onchange script.

I haven’t found a way to do this. I’ve tried:

Target = "some value"
Range(Target.Address) = "some value"
Target.Value = "some value"

But to no avail.

I’m aware that this may trigger again the onchange event, but the script is prepared for that. And in case it is not supposed to be triggered, I may use

Application.EnableEvents = False

before any update and

Application.EnableEvents = True

when done…

Any ideas?

  • 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-16T22:40:51+00:00Added an answer on June 16, 2026 at 10:40 pm

    I know this isn’t much of an answer but I need to be able to post code.

    The following works absolutely fine for me when entered in the worksheet code section:

    Private Sub Worksheet_Change(ByVal Target As Range)
        Application.EnableEvents = False
        Target.Value = "some value"
        Application.EnableEvents = True
    End Sub
    

    I select a cell, type “a” and press enter; it’s replaced with the text “some value”. If you want cell contents to be replaced as you type, you’re out of luck; as far as I know the event will only fire after the cell content change.

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

Sidebar

Related Questions

I have a dropdown list. I am using onchange event of this dropdown to
I have a javascript that runs using the onchange event when a user enteres
On this page: http://www.blackdownluxurylettings.co.uk/place_booking/2010-3-18,2 I am using an onchange event on the number of
Setting onchange event for CheckBoxList using the following code doesn't work. chkListUserGroup.Attributes.Add(onchange, document.forms[0].isRecordModified.value='true';); How
In onchange event is not working in jquery.selectbox-05, i am using two dropdown box
I'm using dojo's DateTextBox with a connected onChange event. There are cases users select
I have a form and everytime some performs a onchange()-event, the page should run
There is a drop down using select <%= select(array, folder, @rows.keys, {}, :onchange =>?
Using SQL Server 2008 R2 we are looking for a way to select the
I have written a ruby script to screen scrape something using the 'open-uri' and

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.