Dicas Microsoft Excel VBA(Visual Basic Application) SaberExcel
TODAS AS FÓRMULAS EXISTENTES NA FOLHA DE PLANILHA EM COMENTÁRIOS 'Esta macro insere as formulas usadas em comentarios, 'Todas as formulas usadas na folha de planilha
Sub Formulas_em_Comentarios() Dim cell, Largura, Altura On Error Resume Next For Each cell In ActiveSheet.UsedRange If cell.HasFormula Then cell.AddComment cell.Comment.Text Text:=cell.FormulaLocal With cell.Comment.Shape Largura = .Width Altura = .Height .TextFrame.AutoSize = True
If .Width > 350 Then .Width = 350 .Height = 55 End If
End With End If Next Saber1.Shapes("sb1").Visible = True Saber1.Shapes("sba").Visible = False End Sub
'Macro para deletar todos os comentários inseridos na planilha. Sub Deleta_comentarios() For i = ActiveSheet.Comments.Count To 1 Step -1 ActiveSheet.Comments(i).Delete Next i Saber1.Shapes("sba").Visible = True Saber1.Shapes("sb1").Visible = False End Sub
Aprenda tudo sobre o Aplicativo Microsoft Excel VBA com Saberexcel Baixar exemplo de planilha excel vba contendo a macro acima
Publicidade:
Compras pela internet com muita segurança e bons preços 
|