Macros write a macro from sheet 1 to copy data when selected
Closed
ruincontrl
Posts
1
Registration date
Tuesday February 7, 2017
Status
Member
Last seen
February 7, 2017
-
Updated by Ambucias on 7/02/17 at 04:15 PM
vcoolio Posts 1411 Registration date Thursday July 24, 2014 Status Moderator Last seen September 6, 2024 - Feb 9, 2017 at 04:42 AM
vcoolio Posts 1411 Registration date Thursday July 24, 2014 Status Moderator Last seen September 6, 2024 - Feb 9, 2017 at 04:42 AM
Related:
- Macros write a macro from sheet 1 to copy data when selected
- How to write & in laptop - Guide
- Fnaf 1 download pc - Download - Horror
- Tentacle locker 1 - Download - Adult games
- Fnia 1 - Download - Adult games
- Igi 1 download - Download - Shooters
1 response
vcoolio
Posts
1411
Registration date
Thursday July 24, 2014
Status
Moderator
Last seen
September 6, 2024
262
Feb 9, 2017 at 04:42 AM
Feb 9, 2017 at 04:42 AM
Hello Ruincontrl,
Try the following code in a standard module assigned to a button:-
Select the row of data that you wish to transfer to Sheet2 then click on the button and that row will be transferred to Sheet2 and deleted from Sheet1.
I hope that this helps.
Cheerio,
vcoolio.
Try the following code in a standard module assigned to a button:-
Sub TransferData() Dim Confirm As String Confirm = MsgBox("The selected row will be copied to Sheet2 and deleted from Sheet1.", vbOKCancel, "Copy Entire Row") If Confirm = vbCancel Then Exit Sub Selection.Copy Sheet2.Range("A" & Rows.Count).End(xlUp).Offset(1, 0) Selection.EntireRow.Delete MsgBox "Data transfer complete!", vbExclamation Sheet2.Select End Sub
Select the row of data that you wish to transfer to Sheet2 then click on the button and that row will be transferred to Sheet2 and deleted from Sheet1.
I hope that this helps.
Cheerio,
vcoolio.