TheDonRules
New Member
- Joined
- Sep 17, 2006
- Messages
- 6
I have searched the forum and have found TONS of awesome info but not exactly what I need. The following is my question:
I am creating a sheet that I need to have the date automatically inserted into a particular cell and the name of the user making the entry into another cell. This needs to be performed when the user checks a checkbox in one particular cell. How do I do this?
I hope this is specific enough. Please let me know if more info is needed. If possible, I found a post on how to create a macro that auto-populated fields with checkboxes and changes the color of the cells when a box is checked. Can someone modify this code to perform what I need? ALSO...I would like the boxes to be in 3D.
If someone can help me with this, I will PAY!! Really, I will.
Many thanks in advance for any assistance!
Sincerely,
Don
Here is the code:
Sub chckbxmkr()
On Error Resume Next
Dim c As Range, myRange As Range
Set myRange = Selection
For Each c In myRange.Cells
ActiveSheet.CheckBoxes.Add(c.Left, c.Top, c.Width, c.Height).Select
With Selection
.LinkedCell = c.Address
.Characters.Text = ""
.Name = c.Address
End With
c.Select
With Selection
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, _
Formula1:="=" & c.Address & "=TRUE"
.FormatConditions(1).Font.ColorIndex = 6 'change for other color when ticked
.FormatConditions(1).Interior.ColorIndex = 6 'change for other color when ticked
.Font.ColorIndex = 2 'cell background color = White
End With
Next
myRange.Select
End Sub
I am creating a sheet that I need to have the date automatically inserted into a particular cell and the name of the user making the entry into another cell. This needs to be performed when the user checks a checkbox in one particular cell. How do I do this?
I hope this is specific enough. Please let me know if more info is needed. If possible, I found a post on how to create a macro that auto-populated fields with checkboxes and changes the color of the cells when a box is checked. Can someone modify this code to perform what I need? ALSO...I would like the boxes to be in 3D.
If someone can help me with this, I will PAY!! Really, I will.
Many thanks in advance for any assistance!
Sincerely,
Don
Here is the code:
Sub chckbxmkr()
On Error Resume Next
Dim c As Range, myRange As Range
Set myRange = Selection
For Each c In myRange.Cells
ActiveSheet.CheckBoxes.Add(c.Left, c.Top, c.Width, c.Height).Select
With Selection
.LinkedCell = c.Address
.Characters.Text = ""
.Name = c.Address
End With
c.Select
With Selection
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, _
Formula1:="=" & c.Address & "=TRUE"
.FormatConditions(1).Font.ColorIndex = 6 'change for other color when ticked
.FormatConditions(1).Interior.ColorIndex = 6 'change for other color when ticked
.Font.ColorIndex = 2 'cell background color = White
End With
Next
myRange.Select
End Sub