zoukankan      html  css  js  c++  java
  • XL97: "Cannot Shift Objects Off Sheet" Error Hiding Columns

    To resolve this problem, follow these steps:

    1. Because cell comments are hidden by default, select the cell containing the comment, right-click the cell, and then click Show Comment on the shortcut menu.
    2. If the workbook is not shared, move the pointer to the edge of the comment until the pointer turns into four small black arrows. Click the comment to select the comment object. If the workbook is shared, move the pointer to the edge of the comment until the pointer turns into a white arrow pointer. Click the comment to select the comment object.
    3. On the Format menu, click Comment. In the Format Comment dialog box, click the Properties tab.
    4. Click "Move and size with cells," and then click OK.
    5. If you want to hide the cell comment again, right-click the cell and click Hide Comment on the shortcut menu.

    When you hide the columns, you do not receive the error message.

    Macro :

     1 Sub FixCanntShiftObject()
     2     Dim sh As Worksheet
     3     For Each sh In Sheets
     4         For Each c In sh.UsedRange
     5             
     6             If Not c.Comment Is Nothing Then
     7            
     8              With c.Comment.Shape
     9                  .Placement = xlMoveAndSize
    10                  
    11              End With
    12             
    13             End If
    14         Next
    15     Next
    16     MsgBox "OK"
    17 End Sub
  • 相关阅读:
    react文本溢出hover气泡显示全部文本——JS判断文本溢出
    ecosystem.config
    git删除中间某次提交
    HTML5 新元素
    HTML5存储
    简述LVS(Linux虚拟服务器)
    简述线程池
    网络协议基础
    JVM常用性能检测工具
    线程间的“通信”方法
  • 原文地址:https://www.cnblogs.com/huigll/p/2970606.html
Copyright © 2011-2022 走看看