+ Reply to Thread
Results 1 to 2 of 2

Applying a change based on a CheckBox

  1. #1
    Patrick Simonds
    Guest

    Applying a change based on a CheckBox

    Currently I use the following code to populate a cell on my worksheet from a
    TextBox on a DialogBox:

    Private Sub CommandButton1_Click()

    Dim rng
    Set rng = Cells(ActiveCell.Row, 1)
    rng(1, 1).Value = TextBox3.Text

    End Sub

    Also on that DialogBox is a CheckBox. What I would like to have happen is,
    if the CheckBox is selected (checked) then an X would be placed in cell 3 of
    the current row "rng(1, 3)".




  2. #2
    Henry
    Guest

    Re: Applying a change based on a CheckBox

    Patrick,

    Before the End Sub line:

    If Checkbox1.Value = True then rng(1,3).value = "X"

    Henry


    "Patrick Simonds" <ordnance1@comcast.net> wrote in message
    news:ue6D0QflFHA.1968@TK2MSFTNGP14.phx.gbl...
    > Currently I use the following code to populate a cell on my worksheet from
    > a TextBox on a DialogBox:
    >
    > Private Sub CommandButton1_Click()
    >
    > Dim rng
    > Set rng = Cells(ActiveCell.Row, 1)
    > rng(1, 1).Value = TextBox3.Text
    >
    > End Sub
    >
    > Also on that DialogBox is a CheckBox. What I would like to have happen is,
    > if the CheckBox is selected (checked) then an X would be placed in cell 3
    > of the current row "rng(1, 3)".
    >
    >
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1