+ Reply to Thread
Results 1 to 3 of 3

Tick Boxes that are attached to a cell

  1. #1
    Andibevan
    Guest

    Tick Boxes that are attached to a cell

    Hi All,

    I have a spreadsheet that lists resources in column A and There expenses per
    month in Column B.

    I want to add a tick-box in column C that is essentially embedded / attached
    into the cell so that when I copy the rows down it copies the tick box.

    I know this is simple but I am not sure which one of the many ways is
    required.

    Thanks

    Andi



  2. #2
    Bob Phillips
    Guest

    Re: Tick Boxes that are attached to a cell

    Andi,

    You can get checkboxes to move with a cell (from the Forms toolbar), but if
    you want to copy them, that isn't so easy.

    How about an alternative idea?

    Rather than use a checkbox, I suggest just using a check column. So if we
    assume that the data is in A1:E100 (change to suit), clicking in column A
    will do what you want with this code.


    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Application.EnableEvents = False
    On Error GoTo sub_exit
    If Not Intersect(Target, Range("A1:A100")) Is Nothing Then
    With Target
    If .Value = "a" Then
    .Value = ""
    Else
    .Value = "a"
    .Font.Name = "Marlett"
    End If
    .Offset(0, 1).Activate
    End With
    End If
    sub_exit:
    Application.EnableEvents = True
    End Sub


    'This is worksheet event code, which means that it needs to be
    'placed in the appropriate worksheet code module, not a standard
    'code module. To do this, right-click on the sheet tab, select
    'the View Code option from the menu, and paste the code in.


    --
    HTH

    Bob Phillips

    "Andibevan" <[email protected]> wrote in message
    news:[email protected]...
    > Hi All,
    >
    > I have a spreadsheet that lists resources in column A and There expenses

    per
    > month in Column B.
    >
    > I want to add a tick-box in column C that is essentially embedded /

    attached
    > into the cell so that when I copy the rows down it copies the tick box.
    >
    > I know this is simple but I am not sure which one of the many ways is
    > required.
    >
    > Thanks
    >
    > Andi
    >
    >




  3. #3
    Andibevan
    Guest

    Re: Tick Boxes that are attached to a cell

    Bob,

    Thanks for the alternative selection. As you have now pointed out copying
    the tick boxes isn't easier I think I will just use a data validation list
    box with Y / N in it.

    They do seem to behave quite bizarely when you copy them. I can manage to
    put the tick box in a cell and then copy it down one sheet, but when I try
    to copy the cell to a seperate workbook it does not come across.

    Thanks

    Andi

    "Bob Phillips" <[email protected]> wrote in message
    news:[email protected]...
    > Andi,
    >
    > You can get checkboxes to move with a cell (from the Forms toolbar), but

    if
    > you want to copy them, that isn't so easy.
    >
    > How about an alternative idea?
    >
    > Rather than use a checkbox, I suggest just using a check column. So if we
    > assume that the data is in A1:E100 (change to suit), clicking in column A
    > will do what you want with this code.
    >
    >
    > Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    > Application.EnableEvents = False
    > On Error GoTo sub_exit
    > If Not Intersect(Target, Range("A1:A100")) Is Nothing Then
    > With Target
    > If .Value = "a" Then
    > .Value = ""
    > Else
    > .Value = "a"
    > .Font.Name = "Marlett"
    > End If
    > .Offset(0, 1).Activate
    > End With
    > End If
    > sub_exit:
    > Application.EnableEvents = True
    > End Sub
    >
    >
    > 'This is worksheet event code, which means that it needs to be
    > 'placed in the appropriate worksheet code module, not a standard
    > 'code module. To do this, right-click on the sheet tab, select
    > 'the View Code option from the menu, and paste the code in.
    >
    >
    > --
    > HTH
    >
    > Bob Phillips
    >
    > "Andibevan" <[email protected]> wrote in message
    > news:[email protected]...
    > > Hi All,
    > >
    > > I have a spreadsheet that lists resources in column A and There expenses

    > per
    > > month in Column B.
    > >
    > > I want to add a tick-box in column C that is essentially embedded /

    > attached
    > > into the cell so that when I copy the rows down it copies the tick box.
    > >
    > > I know this is simple but I am not sure which one of the many ways is
    > > required.
    > >
    > > Thanks
    > >
    > > Andi
    > >
    > >

    >
    >




+ 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