Personal tools

Difference between revisions of "Vba"

From MohidWiki

Jump to: navigation, search
(New page: vba or visual-basic for applications is a scripting/programming language and development environment embedded within the Office suite software from microsoft. The syntax is equivalent ...)
 
Line 3: Line 3:
 
==Sample code===
 
==Sample code===
  
<code lang="vb">
+
<htm>
 +
<pre name="code" class="vb">
 
'Rotina que apaga os gráficos existentes
 
'Rotina que apaga os gráficos existentes
 
Public Sub apagaGrafico()
 
Public Sub apagaGrafico()
Line 19: Line 20:
  
 
End Sub
 
End Sub
</code>
+
</pre>
 +
</htm>
  
 
==External links==
 
==External links==

Revision as of 18:51, 29 April 2010

vba or visual-basic for applications is a scripting/programming language and development environment embedded within the Office suite software from microsoft. The syntax is equivalent to visual-basic, but the libraries and functions give direct access to the objects of the Office environment.

Sample code=

'Rotina que apaga os gráficos existentes
Public Sub apagaGrafico()

    'Iterador de tipo "gráfico"
    Dim Chart As ChartObject

    'Para cada gráfico dentro da colecção de gráficos da ActiveSheet ...
    For Each Chart In ActiveSheet.ChartObjects

        '... apaga o gráfico.
        Chart.Delete

    Next

End Sub


External links