vendredi 19 mars 2021

Vba - Checkbox Issue

I have sheet named "Reference & Joins" where All Column ("A") data are autofilltered to Column E then filtered data are copied to another Colmun (Column F) So the check box on the other sheet is checked or unchecked based on F2 Cell value of the other sheet

Problems i face are as below notes and snpahsot from the error

  1. Check box is not check automatically untill i delete the related Cell value manually and copy the desired data manually

  2. debug message as below snapshot while deleting data from this cell or resetting data

  3. also how to edit check box code in the sheet module to add another check box located in the same sheet

enter image description here

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
  
 Dim CheckDest As Worksheet
 Set CheckDest = ThisWorkbook.Worksheets("BSS Mobile MainPage")

  If Not Intersect(Target, Range("F2")) Is Nothing Then
    If Target.Value = "Scratch Cards" Then
       CheckDest.CheckBoxes("Rwa").Value = True
    Else
       CheckDest.CheckBoxes("Rwa").Value = False
    End If
  End If
End Sub



Aucun commentaire:

Enregistrer un commentaire