0

My problem I think is quite simple, but since I am new to this excel vba macro, it is quite tricky. To put it simply, I have two excel file.One with "Refresh" Button. Another excel file with several CheckBoxs, with some words and number in different cell same row. So, when I press "Refresh", I only need info only on the 'ticked' Checkbox. And the info will change when I 'untick' the CheckBox, and vice versa.

Community
  • 1
  • 1
silver_river
  • 169
  • 1
  • 10

1 Answers1

1

I put in the sample 1 button (WorkSheet1) and 3 CheckBox (WorkSheet2).
In the code of Button of Worksheet(1) you write:

With Workbooks("Book2")
    Range("A1").Value = .Sheets("Sheet1").checkbox1.Value
    Range("A2").Value = .Sheets("Sheet1").checkbox2.Value
    Range("A3").Value = .Sheets("Sheet1").checkbox3.Value
End With

This code capture the state of Workbooks(2)...
Modify this code you can capture the data you want.
If you want, in every code of chackbox of Worksheet(2) this code:

With Workbooks("Book1")
    .Sheets("Sheet1").Range("A1").Value = CheckBox1.Value
End With

This code write True or False for every CheckBox...

user3514930
  • 1,721
  • 1
  • 9
  • 7