1. Variable
Start your microsoft office excel 2010 and click on develop tab then click on macro. .
1 . Click on developer-->Macros
2. Insert new macro name and click on Create button.
3. Paste below script in your Macro.
Sub variable1()
Dim i As Integer 'nunber without decimal
Dim a As String 'character
Dim x As Double 'number with decimal
i = 30 'move 30 into variable i
a = "Hello World" 'move hello World into variable a
x = 1.33333 'move 1.33333 into vairable x
' message result
MsgBox i & " is integer. '" & a & "' is a string. " & x & " is a double."
End Sub
4. Output:
1 . Click on developer-->Macros
2. Insert new macro name and click on Create button.
3. Paste below script in your Macro.
Sub variable1()
Dim i As Integer 'nunber without decimal
Dim a As String 'character
Dim x As Double 'number with decimal
i = 30 'move 30 into variable i
a = "Hello World" 'move hello World into variable a
x = 1.33333 'move 1.33333 into vairable x
' message result
MsgBox i & " is integer. '" & a & "' is a string. " & x & " is a double."
End Sub
4. Output:
Comments
Post a Comment