View Single Post
 
Old 08-07-2019, 03:31 AM
jaffa20 jaffa20 is offline Windows 10 Office 2019
Novice
 
Join Date: Aug 2019
Posts: 4
jaffa20 is on a distinguished road
Default I tried to record a macro for each checkbox but it reverts to the original selection

I tried recording a macro and getting it to copy the contents of a cell (the dropdown of the customer name) and then do a ctrl + F to find the row of that customer to fill in the cell. However, when I run the macro it just reverts back to the customer which I recorded the macro on. When I view the code to edit it, it specifies the customer. How should I write it so it copies the cell contents and doesn't revert to the original dropdown selection?
Here is the code if it helps:
Code:
Sub AM_Missing_tick()
'
' AM_Missing_tick Macro
'

'
Range("A1:E1").Select
ActiveCell.FormulaR1C1 = "2gether NHS Foundation Trust"
Range("G1").Select
Sheets("Recorded Errors").Select
Cells.Find(What:="2gether NHS Foundation Trust", After:=ActiveCell, LookIn _
:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False).Activate
Range("B4").Select
ActiveCell.FormulaR1C1 = "x"
Sheets("Quality Check").Select
End Sub
Reply With Quote