KCobster24
New Member
- Joined
- Oct 14, 2023
- Messages
- 2
- Office Version
- 365
- Platform
- Windows
Hello All,
I'm making myself a task list, in this list i will have repeating tasks. Once the task is done (and dated) it needs to be done again (think how the laundry is in an never ending loop of despair).
I'm VERY new to VBA and despite a few days of google searching (which I, previous to this endeavor, thought I was great at google research) I cannot figure out a code that will accomplish the above.
THUS Far I've been able to do accomplish this for regenerating the line item....... (i'd attach a sheet but the mini-sheet capture range in my add-in is greyed out and won't let me use it for some reason.....):
Sub regenerate_Task()
' regenerate_Task Macro
Rows("2:2").Select
Selection.Copy
Rows("2:2").Select
Selection.Insert Shift:=xlDown
Application.CutCopyMode = False
End Sub
AND This for getting it to generate a date done:.....
Sub CheckBox_Date_Stamp1()
Dim xChk As CheckBox
Set xChk = Sheet2.CheckBoxes(Application.Caller)
With xChk.TopLeftCell.Offset(, 7)
If xChk.Value = xlOff Then
.Value = ""
Else
.Value = Date
End If
End With
End Sub
However I can't get the box to be pasted unchecked (so its ready to be used later) and I've not even added in the dating part that I've figured out on a different sheet (I had planned on combining the codes at the end). I've tried various things but ended up cutting them from the code above since I'd rather have a partly working code than a fully broken one.
In a Perfect world I'd have the checkbox do the following things:
Copy the line item
Populate the date completed in a "Date Done" column (no preference what column this gets assigned to)
Paste the task (the row we just checked) with an unchecked box to the last row (I know my code above just inserts below, i was also struggling with last row issues so i compromised)
Any instruction, tips, tricks, full code for me to copy paste, etc. is welcome. TYSMIA
I'm making myself a task list, in this list i will have repeating tasks. Once the task is done (and dated) it needs to be done again (think how the laundry is in an never ending loop of despair).
I'm VERY new to VBA and despite a few days of google searching (which I, previous to this endeavor, thought I was great at google research) I cannot figure out a code that will accomplish the above.
THUS Far I've been able to do accomplish this for regenerating the line item....... (i'd attach a sheet but the mini-sheet capture range in my add-in is greyed out and won't let me use it for some reason.....):
Sub regenerate_Task()
' regenerate_Task Macro
Rows("2:2").Select
Selection.Copy
Rows("2:2").Select
Selection.Insert Shift:=xlDown
Application.CutCopyMode = False
End Sub
AND This for getting it to generate a date done:.....
Sub CheckBox_Date_Stamp1()
Dim xChk As CheckBox
Set xChk = Sheet2.CheckBoxes(Application.Caller)
With xChk.TopLeftCell.Offset(, 7)
If xChk.Value = xlOff Then
.Value = ""
Else
.Value = Date
End If
End With
End Sub
However I can't get the box to be pasted unchecked (so its ready to be used later) and I've not even added in the dating part that I've figured out on a different sheet (I had planned on combining the codes at the end). I've tried various things but ended up cutting them from the code above since I'd rather have a partly working code than a fully broken one.
In a Perfect world I'd have the checkbox do the following things:
Copy the line item
Populate the date completed in a "Date Done" column (no preference what column this gets assigned to)
Paste the task (the row we just checked) with an unchecked box to the last row (I know my code above just inserts below, i was also struggling with last row issues so i compromised)
Any instruction, tips, tricks, full code for me to copy paste, etc. is welcome. TYSMIA