Professional Documents
Culture Documents
Box
Sub sbExample1()
MsgBox Range("A5")
End Sub
'Example 4: How To Change The Font Color And Font Size Of A Particular Range
Sub sbExample4()
End Sub
'You can use UCase function to change the text into Upper Case
Range("C2").Value = UCase(Range("C2").Value)
'You can use LCase function to change the text into Upper Case
Range("C3").Value = LCase(Range("C3").Value)
End Sub
'Example 6: How To Copy Data From One Range To Another Range
Sub sbExample6()
Range("A1:D11").Copy Destination:=Range("H1")
End Sub
Sheet2.Select
Sheet1.Activate
End Sub
Option Explicit
Dim i As Integer
For i = 1 To Len(Number)
End If
Next i
End Function
Sub Addition()
var1 = Range("A2").Value
var2 = Range("B2").Value
Range("C2").Select
ActiveCell.FormulaR1C1 = Add
End Sub
Function MessageBox_Demo()
Dim a As Integer
MsgBox ("Welcome")
End Function
Sub Command1_Click()
Dim i As Integer
str = Text1.Text
i = IsNumeric(str)
If i = 0 Then
Text2.Text = "string data"
End If
End Sub
Sub Add_2()
Dim a As Integer
Dim b As Integer
Dim c As Integer
a = 30
b = 20
c=a+b
Range("a3").Value = c
End Sub
Sub SI()
Dim P As Integer
Dim R As Double
Dim T As Integer
P = 5000
R = 0.1
T=5
Simp_Int = P * R * T
Range("b3").Value = Simp_Int
End Sub
Sub SI2()
Dim P As Integer
Dim R As Double
Dim T As Integer
P = 5000
R = 0.1
T = 10
T = Application.InputBox("Enter a number")
Simp_Int = P * R * T
Range("b3").Value = Simp_Int
End Sub