yogeshCR7
New Member
- Joined
- Mar 27, 2024
- Messages
- 2
- Office Version
- 365
- 2021
- 2019
- 2016
- Platform
- Windows
Hello
I have two workbook PR & DB. I have few checkboxes in PR workbook.
My requirement is whenever a user clicks on any checkbox, the checkbox name should get reflected in workbook DB in a particular column. If the user unticks the checkbox, the value should disappear
I tried the following code but it didnt help
Set targetColumn = ws2.Range("A:A")
For Each checkbox In ws1.CheckBoxes
Dim checkboxName As String
checkboxName = checkbox.Name
Dim emptyCell As Range
Set emptyCell = targetColumn.Cells(targetColumn.Cells.Count).End(xlUp).Offset(1)
Next checkbox
Set targetWorksheet = Nothing
Set sourceWorksheet = Nothing
Set wb1 = Nothing
Set checkbox = Nothing
wb2.Save
I have two workbook PR & DB. I have few checkboxes in PR workbook.
My requirement is whenever a user clicks on any checkbox, the checkbox name should get reflected in workbook DB in a particular column. If the user unticks the checkbox, the value should disappear
I tried the following code but it didnt help
Set targetColumn = ws2.Range("A:A")
For Each checkbox In ws1.CheckBoxes
Dim checkboxName As String
checkboxName = checkbox.Name
Dim emptyCell As Range
Set emptyCell = targetColumn.Cells(targetColumn.Cells.Count).End(xlUp).Offset(1)
Next checkbox
Set targetWorksheet = Nothing
Set sourceWorksheet = Nothing
Set wb1 = Nothing
Set checkbox = Nothing
wb2.Save