Forms CheckBox

  • Hi all


    I want a user to be able to check a forms checkbox. Then the result, be it TRUE or FALSE determines if his or her Application.Username appears in a cell on another sheet within the same workbook.


    Something like this (but it doesnt work)


    Code
    If CheckBox20.Value = True Then
            Worksheets("Log").Range("B6") = Application.UserName
                    
    ElseIf CheckBox20.Value = False Then
            Worksheets("Log").Range("B6") = " "
            
            
    End If


    Thanks for your time

  • Re: Forms CheckBox


    You could do this using a cell link. Set up a cell link through from your check box by right clicking=>Format Control=> then the Control tab.


    then use


    Code
    if range("cell_link").value = true then 
        Worksheets("Log").Range("B6") = Application.UserName 
      if range("cell_link").value = false then
        Worksheets("Log").Range("B6") = " " 
    
    
    end sub


    I know this may need tidying up to make it more readable but it should work.


    Alastair

    Einstein:
    Things should be made as simple as possible, but not any simpler


    Be sure to check out TemplateZone for all your Microsoft Office Needs.
    Get OfficeReady Professional 3.0 here!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!