Hello guys,
Need some help here. I have a form and I need my code to update the form values into a specific range (M55:Q65) in my worksheet.
<tbody>
</tbody>
But the data gets updated from row 71. I believe I am doing something wrong. Could someone plz guide me?
Thanks
Ragav.
Need some help here. I have a form and I need my code to update the form values into a specific range (M55:Q65) in my worksheet.
Rno | M | N | O | P |
52 | End of Booking Data | |||
53 | ||||
54 | ||||
55 | eDM Name | Tot sends | Uniq OR | Uniq CTR |
56 | Need the data to updated 4rm this line | |||
57 | ||||
58 | ||||
59 | ||||
60 | ||||
61 | ||||
62 | ||||
63 | ||||
64 | ||||
65 | ||||
66 | ||||
67 | ||||
68 | ||||
69 | ||||
70 | End of eDM Data | |||
71 | But Data is getting updated here |
<tbody>
</tbody>
Code:
Private Sub add_edm_data_Click()
Dim sht, cmp_dash As Worksheet
Dim find_row_eDM, find_col_camp, edm_upd_row_no As Integer
Set sht = ThisWorkbook.Worksheets("Campaign Results Data")
Set cmp_dash = ThisWorkbook.Worksheets("Campaign Dashboard")
find_col_camp = sht.Cells.Find(What:=camp_results.camp_name.Caption, After:=[A1], SearchOrder:=xlByColumns, SearchDirection:=xlNext).Column
find_row_eDM = sht.Cells.Find(What:="eDM Name", After:=[A1], SearchOrder:=xlByRows, SearchDirection:=xlNext).Row
sht.Activate
Set eDM_range = sht.Range(Cells(find_row_eDM, find_col_camp), Cells(find_row_eDM + 10, find_col_camp + 4))
edm_upd_row_no = eDM_range.End(xlDown).Row
'Update eDM Values
sht.Cells(edm_upd_row_no + 1, find_col_camp).Value = edm_name.Value
sht.Cells(edm_upd_row_no + 1, find_col_camp + 1).Value = tot_sends.Value
sht.Cells(edm_upd_row_no + 1, find_col_camp + 2).Value = Format(uq_OR.Value, "%")
sht.Cells(edm_upd_row_no + 1, find_col_camp + 3).Value = Format(uq_CTR.Value, "%")
cmp_dash.Activate
End Sub
But the data gets updated from row 71. I believe I am doing something wrong. Could someone plz guide me?
Thanks
Ragav.