Cut Copy Paste Option

Closed
Report
Posts
77
Registration date
Saturday September 5, 2015
Status
Member
Last seen
March 8, 2017
-
Posts
77
Registration date
Saturday September 5, 2015
Status
Member
Last seen
March 8, 2017
-
Hello,

I would like to request if user copy data from "ExcFileB" Sheet1 to "ExcFileA" Sheet1
then it always Pasted as Values.
Is this possible in Module
I need that because I made a specific design for table in ExcFileA Sheet1 and also containing VB Code
User always copy data from ExcFileB Sheet1 to ExcFileA Sheet1 and paste it.
Since it is instructed that always Pasted as Values but some were follow and some don't follow
If user just pasted then it will changes the design of Table which is done in ExcFileA Sheet1 and
also VB Code is not working properly. (After saving and open that file then it works)
Please don't consider FileName as any Entity because File Name changes many time. It is only for sample.
Please consider copy action from memory or clipboard so it may be no need to assign any entity to File Name.
because Selection area could be different for copying
Pasting area is specified i.e. B2 to D1000
Thanks


1 reply

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
you can use macro recorder to create a template macro
0
Posts
77
Registration date
Saturday September 5, 2015
Status
Member
Last seen
March 8, 2017
1
Thanks for Informing but will you help me to solve it or create it.
0
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768 >
Posts
77
Registration date
Saturday September 5, 2015
Status
Member
Last seen
March 8, 2017

I am trying to help you in solving your issue. Paste your template macro and i would then be able to help. In case you are not aware, macro recorder is use to record you actions and create a macro that can then be customized to make it more suitable.
0
Posts
77
Registration date
Saturday September 5, 2015
Status
Member
Last seen
March 8, 2017
1 >
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020

Hi
Sorry if I don't understand your point.
You are saying that How to record the Macro if Yes then for this I recorded the Macro
where it doesn't have a code

Sub PasteAsValues()
'
' PasteAsValues Macro
' Macro will run to pasted as Values
'

'
End Sub

Thanks again and also apologies If I don't understand
0
Posts
77
Registration date
Saturday September 5, 2015
Status
Member
Last seen
March 8, 2017
1 >
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020

This is the code for Record Macro

Sub PasteAsValues()
'
' PasteAsValues Macro
' Macro will run to pasted as Values
'
Range("A:A").Select
Selection.Copy
Range("B:B").Select
ActiveSheet.PasteAsValues

Application.CutCopyMode = False


'
End Sub

but what I need if user copy from any workbook sheet where ever he pasted in another workbook sheet always pasted as values.

Thanks
0