0% found this document useful (0 votes)
4 views3 pages

Significado de Dim en VBA

The document provides VBA macros for declaring variables and performing operations in Excel. It includes a subroutine for validating variable types and another for reading and writing data to specific cells, as well as modifying a chart based on that data. The macros utilize functions to run external Excel files and manipulate cell values and chart data dynamically.

Uploaded by

Fernando Silva
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views3 pages

Significado de Dim en VBA

The document provides VBA macros for declaring variables and performing operations in Excel. It includes a subroutine for validating variable types and another for reading and writing data to specific cells, as well as modifying a chart based on that data. The macros utilize functions to run external Excel files and manipulate cell values and chart data dynamically.

Uploaded by

Fernando Silva
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Macros: Declaracion de Variables en Vba

Sub Tiposdevariables()

Dim Validacion

Dim IntV, StrV, DateV

IntV = 10

StrV = "Hola Mundo"

DateV = #8/10/2021#

Validacion = VarType(IntV)

MsgBox (Validacion)

Validacion = VarType(StrV)

MsgBox (Validacion)

Validacion = VarType(DateV)

MsgBox (Validacion)

'2 significa Integer

'7 significa date

'8 significa

End Sub

Macros: Leer y Escribir en Celdas Especificas con Vba

Sub graficar()

[Link] "[Link]!Rango"
[Link] "[Link]!EvalF"

[Link] "[Link]!ModGraf"

End Sub

Sub EvalF()

Dim i As Integer

Dim n As Integer

Dim x As Double

Dim y As Variant

n = [Link]("A").Find("*", searchdirection:=xlPrevious).Row

For i = 2 To n

Set celda = Worksheets("Hoja1").Cells(i, 1)

x = [Link]

y = Range("D3").Text

y2 = "=" & Replace(y, "x", x)

Set celda2 = Worksheets("Hoja1").Cells(i, 2)

[Link] = y2

Sub ModGraf()

Dim Rango As Range

Dim i As Integer
Dim j As Integer

i = [Link]("A").Find("*", searchdirection:=xlPrevious).Row

Range("A1").Select

[Link]("GRAFICO").Select

[Link] Source:=Range(Cells(1, 1), Cells(i, 2))

[Link] = 1

Sub graficar()

[Link] "[Link]!Rango"

[Link] "[Link]!EvalF"

[Link] "[Link]!ModGraf"

End Sub

End Sub

Next

End Sub

You might also like