This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub Test() | |
<statement> | |
End Sub() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub Test() | |
Debug.Print "Hello World" | |
End Sub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub Test() | |
'Dim variableName as variableType | |
Dim int1 as Integer | |
Dim str1 as String | |
int1 = 1 | |
str1 = "Hello World" | |
Debug.print int1 | |
Debug.print str1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub ExtractValues() | |
Debug.Print Cells(1, 1).Value | |
Debug.Print Cells(2, 1).Value | |
End Sub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub WriteValues() | |
Cells(1, 2).Value = "Hello" | |
Cells(2, 2).Value = "World" | |
End Sub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub StringConcat() | |
Cells(3,1).Value = Cells(1, 1).Value & " " & Cells(2, 1).Value | |
End Sub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub IfConditions() | |
If <condition> then | |
<statement> | |
Elseif <condition> then | |
<statement> | |
Else | |
<statement> | |
End If | |
End Sub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub IfName() | |
Dim strName As String | |
strName = "Alex" | |
If strName = "John" Then | |
Debug.Print "Welcome Back" + strName | |
Else | |
Debug.Print "Hello " + strName | |
End If | |
End Sub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub ForLoop() | |
For i = 1 To 10 | |
debug.print i | |
Next i | |
End Sub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub AllRowValues() | |
lastRow = Cells(Rows.Count, 1).End(xlUp).Row | |
For i = 1 To lastRow | |
Debug.Print Cells(i, 1).Value | |
Next i | |
End Sub |
OlderNewer