Results 1 to 4 of 4

Thread: multiply command to checkbox icon

  1. #1

    Question multiply command to checkbox icon



    Register for a FREE account, and/
    or Log in to avoid these ads!

    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.
    Attached Files Attached Files

  2. #2
    Seeker joseph4tw's Avatar
    Join Date
    May 2012
    Location
    South Florida, USA
    Posts
    13
    Articles
    0
    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.

  3. #3
    Yes this works! Thank you very much!!

  4. #4
    Seeker joseph4tw's Avatar
    Join Date
    May 2012
    Location
    South Florida, USA
    Posts
    13
    Articles
    0
    You're welcome

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •