G
gimme_this_gimme_that
'Here is the VBA ...
Sub doOffset()
Dim b As Workbook
Dim s As Worksheet
Dim r As Range
' MsgBox "hello world"
Set b = ActiveWorkbook
Set s = b.Sheets("Sheet1")
Set r = s.Range("A1")
Dim i As Integer
Dim j As Integer
For i = 1 To 3
For j = 1 To 3
r.Offset(i, j).Value = i + j
Next j
Next i
End Sub
-- here is the Applescript
on doOffset()
tell application "Microsoft Excel"
-- display dialog "Hello World"
activate
set b to active workbook
set s to worksheet "Sheet1" of b
set r to range "A1" of s
repeat with i from 1 to 3
repeat with j from 1 to 3
set value of (get offset (r) row offset (i) column offset (j))
to i + j
end repeat
end repeat
end tell
end doOffset
doOffset()
Sub doOffset()
Dim b As Workbook
Dim s As Worksheet
Dim r As Range
' MsgBox "hello world"
Set b = ActiveWorkbook
Set s = b.Sheets("Sheet1")
Set r = s.Range("A1")
Dim i As Integer
Dim j As Integer
For i = 1 To 3
For j = 1 To 3
r.Offset(i, j).Value = i + j
Next j
Next i
End Sub
-- here is the Applescript
on doOffset()
tell application "Microsoft Excel"
-- display dialog "Hello World"
activate
set b to active workbook
set s to worksheet "Sheet1" of b
set r to range "A1" of s
repeat with i from 1 to 3
repeat with j from 1 to 3
set value of (get offset (r) row offset (i) column offset (j))
to i + j
end repeat
end repeat
end tell
end doOffset
doOffset()