Excel精英培训网

 找回密码
 注册
数据透视表40+个常用小技巧,让你一次学会!
查看: 1182|回复: 3

[已解决]求一句代码

[复制链接]
发表于 2013-5-6 17:30 | 显示全部楼层 |阅读模式
如何在工作表被保护的状态下能够插入图片,怎么加一句代码呢?

希望能有这样的代码:ActiveSheet.Protect Allow*********:=True

哪位老师能提供一下的。
谢谢了
最佳答案
2013-5-6 17:55
  1. Sub ProtectionOptions()

  2.     ActiveSheet.Unprotect

  3.     ' Allow columns to be inserted on a protected worksheet.
  4.     If ActiveSheet.Protection.AllowInsertingColumns = False Then
  5.         ActiveSheet.Protect AllowInsertingColumns:=True
  6.     End If

  7.     MsgBox "Columns can be inserted on this protected worksheet."

  8. End Sub
复制代码
excel精英培训的微信平台,每天都会发送excel学习教程和资料。扫一扫明天就可以收到新教程
发表于 2013-5-6 17:55 | 显示全部楼层    本楼为最佳答案   
  1. Sub ProtectionOptions()

  2.     ActiveSheet.Unprotect

  3.     ' Allow columns to be inserted on a protected worksheet.
  4.     If ActiveSheet.Protection.AllowInsertingColumns = False Then
  5.         ActiveSheet.Protect AllowInsertingColumns:=True
  6.     End If

  7.     MsgBox "Columns can be inserted on this protected worksheet."

  8. End Sub
复制代码
回复

使用道具 举报

 楼主| 发表于 2013-5-6 19:08 | 显示全部楼层
zhoujunah 发表于 2013-5-6 17:55

代码不是我要的,我要的是能插入图片,而不是列。谢谢楼上啊。
回复

使用道具 举报

 楼主| 发表于 2013-5-6 19:13 | 显示全部楼层
继续等大师解答。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|Excel精英培训 ( 豫ICP备11015029号 )

GMT+8, 2024-5-20 15:05 , Processed in 0.245268 second(s), 8 queries , Gzip On, Yac On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表