Can a change in a cell, done by VBA, be a trigger for Workbook_SheetChange?

Mster_Dev24

New Member
Joined
Aug 27, 2024
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi everyone
Im currently trying to deselect a checkbox then a value in a cell are automatically changed to "0" by VBA. I trying to to use the "Workbook_SheetChange"-function but it seems to not work then the value in the actual cell (A1) are automatically changed/updated by a VBA-rutine.

VBA Code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)

If Range("A1")="0" then
   ActiveSheet.CheckBoxes("Kryssruta 137").Value = False

Else
EndIf

EndSub

Are there please anyone who can confirm this and what to do instead?
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Changing the value of a cell via a linked control doesn't trigger a Change event unfortunately. The simplest option is to change the linked cell value directly in your code, which will also update the control.
 
Upvote 0
Solution

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top