复制和过去 [英] Copy And Past
问题描述
我需要一些帮助来完成这项工作。
我有一个包含28张相同表格的项目(相同的格式和公式以及相同的功能)这些数据被收集在工作表调用"统计"...
我的所有工作表都受密码保护"在此处设置您选择的任何密码"
Sub CopyPast()
'
'CopyPast Makro
'
Activesheet.unprotect密码:="密码"
范围("C6:AD46")。选择
Application.CutCopyMode = False
Selection.Copy
Activesheet.Protect密码:="密码"
结束子
  ;
Sub PastFromCopy()
Activesheet.Unprotec密码:="密码"
ActiveSheet.Select
范围("C6:E6")。选择
ActiveSheet.Paste
Activesheet.protect密码:="密码"
End Sub
第一部分工作正常但当试图过去时函数附带错误代码
运行时错误438
对象不支持此属性或方法
希望现在有足够的信息
来自丹麦的Henrik
Henrik-1,
代码中的unprotect不正确,它应该是 ActiveSheet.Unprotect密码:="密码"
而不是 Activesheet.Unprotec 密码:="密码"。
另请注意,密码区分大小写,因为代码中的密码不同。
问候&费
I need Some Help to get this Work.
I have a Project with 28 Same Sheet's (same format And Formula's As Well And Same Function) those Data is colected in a Sheet Call "Stat"...
all of my Sheet's Are Protected with Password "Set Any Password of Your Choice Here"
Sub CopyPast()
'
' CopyPast Makro
'
Activesheet.unprotect Password:="Password"
Range("C6:AD46").Select
Application.CutCopyMode = False
Selection.Copy
Activesheet.Protect Password:="Password"
End Sub
Sub PastFromCopy()
Activesheet.Unprotec Password:="password"
ActiveSheet.Select
Range("C6:E6").Select
ActiveSheet.Paste
Activesheet.protect Password:="Password"
End Sub
The First Part Works Fine But When Try to Past the function came with error Code
Run time error 438
Object doesn't Support this property or methode
Hope that was Enough info for now
From Henrik in DenmarkHi Henrik-1,
The unprotect in the code is incorrect, it should be ActiveSheet.Unprotect Password:="Password" instead of Activesheet.Unprotec Password:="password".
Also note, the password is case-sensitive since the password in the code is different.
Regards & Fei
这篇关于复制和过去的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!