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
function Rack(poolTable, ballRadius) { | |
var start = new Point(poolTable.length * 3/4, poolTable.height / 2); | |
function rackEm() { | |
var ballPositions = []; | |
for (var row = 1; row <= 5; row++) { | |
for (var balls = 1; balls <= row; balls++) { | |
ballPositions.push(new Point(start.x * row, 10)); // unfinished...just testing out gist |
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
Option Explicit | |
Public Sub Worksheet_Change(ByVal target As Range) | |
Debug.Print "Something changed in cell " & target.Address(0, 0) | |
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
Option Explicit | |
Public Sub Worksheet_Change(ByVal target As Range) | |
Dim intersection As Range | |
Set intersection = Intersect(target, Range("A1:B3")) | |
If Not intersection Is Nothing Then | |
Debug.Print "Cells that changed: " & target.Address(0, 0), _ | |
vbTab & "Intersection at " & intersection.Address(0, 0) | |
End If |
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
Option Explicit | |
Public Sub Worksheet_Change(ByVal target As Range) | |
Dim intersection As Range | |
Set intersection = Intersect(target, Range("A1:B3")) | |
If Not intersection Is Nothing Then | |
Dim cell As Range | |
For Each cell In intersection |
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
Option Explicit | |
Public Sub Worksheet_Change(ByVal target As Range) | |
Dim intersection As Range | |
Set intersection = Intersect(target, Range("A1:B3")) | |
If Not intersection Is Nothing Then | |
Dim cell As Range | |
Application.EnableEvents = False |
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 Macro1() | |
' | |
' Macro1 Macro | |
' | |
' | |
Range("B1").Select | |
ActiveCell.FormulaR1C1 = "Hi" | |
Range("B1").Select | |
Selection.AutoFill Destination:=Range("B1:B11"), Type:=xlFillDefault |
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
Option Explicit | |
Public Sub GetCellValue() | |
Dim val As String | |
val = Range("A2").Value | |
Debug.Print val | |
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
Option Explicit | |
Public Sub GetCellValue() | |
Dim cell As Range | |
Set cell = Range("A2") | |
Debug.Print cell.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
Option Explicit | |
Public Sub GetCellValue() | |
Dim cell As Range | |
Set cell = Range("A2:A5") | |
Debug.Print cell.Value ' will throw an error "Type Mismatch" | |
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
Option Explicit | |
Public Sub GetCellValue() | |
Dim cellRange As Range | |
Set cellRange = Range("A2:A5") | |
Debug.Print cellRange.cells(1, 1).Value | |
End Sub |
OlderNewer