ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,832
- Office Version
- 2007
- Platform
- Windows
Good Afternoon,
I have the working code in use as supplied below.
When i press my transfer button cell values are coppied from one worksheet to the next sheet.
I then manually select from a drop down bow in cell B1 the month & in cell B2 the year.
I would like to add the above to the working code below so not only does it copy from worksheet to worksheet but also put JUNE 2019 in the cells mentioned.
I would also then use the code in next months worksheets but changed JUNE in the code to JULY
Please advise,many thanks.
I have the working code in use as supplied below.
When i press my transfer button cell values are coppied from one worksheet to the next sheet.
I then manually select from a drop down bow in cell B1 the month & in cell B2 the year.
I would like to add the above to the working code below so not only does it copy from worksheet to worksheet but also put JUNE 2019 in the cells mentioned.
I would also then use the code in next months worksheets but changed JUNE in the code to JULY
Please advise,many thanks.
Code:
Private Sub CommandButton1_Click() Sheets("EXPENSES (3)").Range("D4").Value = Sheets("EXPENSES (2)").Range("D30").Value
Sheets("EXPENSES (3)").Range("F4:K4").Value = Sheets("EXPENSES (2)").Range("F30:K30").Value
Sheets("EXPENSES (3)").Activate
ActiveSheet.Range("A5").Select
If Sheets("EXPENSES (3)").Range("K32").Value <> Sheets("EXPENSES (2)").Range("K32").Value Then MsgBox "Balance of sheets incorrect", vbCritical, "K32 CELLS DO NOT MATCH"
End Sub