multiply command to checkbox icon

Lacostee12

New member
Joined
Jun 20, 2011
Messages
11
Reaction score
0
Points
0
Dear members and administrators,

I should get macro that multiply (double) ´with 2 one cell value after i click its Value = True and undo that when value = False. Idea sounds easy but i wont get it. Problem is because first i have to insert value by manually and after that made a selection does that multiply it or not. So value is not solid and it can vary.

I have workbook added here. I think this is easy for you guys but could you please help me newbie :) Thank you very much.

BR,
Ville

Ps. I'm using excel 2003.
 

Attachments

  • test_workbook.xls
    19 KB · Views: 20
Hello,

Go to the developer tab, click "Design Mode" to activate design mode, right-click the checkbox and click "View Code." Then add this code:

Code:
Private Sub CheckBox1_Click()
    If (CheckBox1.Value = True) Then
        Range("D5").Value = Range("D5").Value * 2
    Else
        Range("D5").Value = Range("D5").Value / 2
    End If
End Sub

Then go back to the developer tab, click "Design Mode" to deactivate design mode.

Hope this helps.
 
Back
Top