简体   繁体   English

如果在电源点表中发现空单元格以及使用 vba 在哪张幻灯片中发现空单元格,则发出警报

[英]Alert if empty cell found in power point tables and in which slide using vba

I have to find and alert that if empty cell found in each tables in power point.我必须找到并提醒,如果在电源点的每个表格中发现空单元格。

I have found the below code here , but it does not work and it should not be find for all table, not for selected one.我在这里找到了下面的代码,但它不起作用,不应该为所有表找到它,而不是为选定的一个。

    Sub CheckTableCells()

    Dim oCell As Cell
    Dim oRow As Row
    Dim MyRange As Range

    For Each oRow In Selection.Tables(1).Rows
        For Each oCell In oRow.Cells
            If Selection.Text = Chr(13) & Chr(7) Then
                oCell.Select
                MsgBox oCell.RowIndex & " " & oCell.ColumnIndex & " is empty."
            End If
        Next oCell
    Next oRow

    End Sub

Please anyone help me for this.请任何人帮助我。

在此处输入图片说明

This code loops through each slide in the active presentation, and in each slide, check whether the each shape on the slide contains a table, and if it does, checks whether each cell is blank.此代码循环播放活动演示文稿中的每张幻灯片,并在每张幻灯片中检查幻灯片上的每个形状是否包含表格,如果包含,则检查每个单元格是否为空白。 Cheers.干杯。

Sub CheckTableCells()

    Dim vSlide As Slide
    Dim vShape As Shape
    Dim vRow As Long
    Dim vColumn As Long

    For Each vSlide In Application.ActivePresentation.Slides
        For Each vShape In vSlide.Shapes
            If vShape.HasTable Then
                For vRow = 1 To vShape.Table.Rows.Count
                    For vColumn = 1 To vShape.Table.Columns.Count
                        If vShape.Table.Cell(vRow, vColumn).Shape.TextFrame.TextRange.Text = "" Then
                            MsgBox vSlide.Name & " Table: """ & vShape.Name & """ cell (" & vRow & "," & vColumn & ") is blank."
                        End If
                    Next
                Next
            End If
        Next
    Next

End Sub

屏幕

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用vba附加excel工作簿以在power point中滑动 - How to attach a excel workbook to slide in power point using vba 我想使用 vba 编辑现有幻灯片中的文本 - I want to edit a text in the existing power point slide using vba 如何使用VBA宏在Powerpoint幻灯片中“重置图片”? - How to “Reset Picture” in Power point Slide using VBA macro? 如何使用vba获得power point slide尺寸? - How to get power point slide dimension using vba? VBA:在单个 Power Point 幻灯片上定位 3 个图形 - VBA: Positioning 3 Graphs On A Single Power Point Slide Select 电源点幻灯片中的所有表格 - Select all Tables in power point slide 需要VBA代码在Powerpoint幻灯片中的表格的特定单元格(基于单元格值)的顶部放置形状(例如:向下箭头/向上箭头) - Need a VBA code to place a shape (ex: Down Arrow/Up Arrow ) on top of the specific cell ( based on cell value ) of the table in power point slide 使用VBA获取Powerpoint幻灯片中同一对象两次单击之间的经过时间 - Get elapsed time between 2 clicks on the same object in power point slide using VBA 删除Power Point幻灯片中的现有图表,并使用VBA替换为新图表 - Delete existing chart in Power Point slide and replace by new chart using VBA Power Point VBA - 将图片从用户窗体复制到幻灯片 - Power Point VBA - Copy Picture from Userform to Slide
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM