Drawback of Copy and Clear code

Solved/Closed
smuneeb Posts 67 Registration date Saturday September 5, 2015 Status Member Last seen March 8, 2017 - Nov 11, 2015 at 04:07 AM
smuneeb Posts 67 Registration date Saturday September 5, 2015 Status Member Last seen March 8, 2017 - Nov 12, 2015 at 11:32 AM
Hello,

I have requested that please solve this issued if it could be solved.
I have found major drawback (May be I am wrong) in the code of Copy data and Clear Data is that whenever it executed, the ruining VBA Code is stop working.
Is Their any possibility that running code is function properly.

Copy Data Code
Sub CopyData()
Worksheets("311").Range("B11:E510").Value = Worksheets("301").Range("B11:E510").Value

Application.CutCopyMode = False

End Sub

and Other Clear Data Code

Sub ClearData()
'
' ClearData Macro
'
Range("B11:E1000").ClearContents

'
End Sub

Thanks for your care.


1 response

TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 552
Nov 12, 2015 at 11:14 AM
Hi Smuneeb,

Aside from an unnecessary code line, there seems nothing wrong with the code.

You say the code stops working. But there is only 1 line per code, after hat line is executed the code stops. Are you expecting some kind of loop?

Best regards,
Trowa
1
smuneeb Posts 67 Registration date Saturday September 5, 2015 Status Member Last seen March 8, 2017 1
Nov 12, 2015 at 11:32 AM
Hi Trowa
Thanks for response. I wont need any kind of loop
Regards
Muneeb
0