I found these text strings printed out. What would they do if used in VBA?


E

Enda

I found these text strings printed out. What would they do if used in
VBA?

What would these do? I found these printed out somewhere.

ActiveWindow.LargeScroll Down:=1
ActiveCell.Offset(13,0).Range("A1").Select
ActiveWindow.LargeScroll Down:=1
ActiveCell.Offset(13,0).Range("A1")Select
ActiveWindow.LargeScroll Down:=1
ActiveCell.Offset(13,0).Range("A1").Select
ActiveWindow.LargeScroll Down:=-1
ActiveCell.Offset(-13,0).Range("A1").Select
ActiveWindow.LargeScroll Down:=-1

ActiveWindow.ScrollRow = 353
ActiveWindow.ScrollRow = 239
ActiveWindow.ScrollRow = 124
ActiveWindow.ScrollRow = 9
ActiveWindow.ScrollRow = 124
ActiveWindow.ScrollRow = 9
Selection.EntireRow.Insert
End Sub
Sub Macro20()

ActiveWindow.ScrollRow = 124
ActiveWindow.ScrollRow = 239
ActiveWindow.ScrollRow = 353
ActiveWindow.ScrollRow = 468
ActiveWindow.ScrollRow = 583
ActiveWindow.ScrollRow = 468
ActiveWindow.ScrollRow = 353
ActiveWindow.ScrollRow = 239
ActiveWindow.ScrollRow = 124
ActiveWindow.ScrollRow = 9
ActiveWindow.ScrollRow = 124
ActiveWindow.ScrollRow = 239
ActiveWindow.ScrollRow = 353
ActiveWindow.ScrollRow = 468
ActiveWindow.ScrollRow = 583
ActiveWindow.ScrollRow = 698
ActiveWindow.ScrollRow = 812
ActiveWindow.ScrollRow = 927
ActiveWindow.ScrollRow = 1042
ActiveWindow.ScrollRow = 1157
ActiveWindow.ScrollRow = 698
ActiveWindow.ScrollRow = 812
ActiveWindow.ScrollRow = 927
ActiveWindow.ScrollRow = 1042
ActiveWindow.ScrollRow = 1157
ActiveWindow.ScrollRow = 1272
ActiveWindow.ScrollRow = 1386
ActiveWindow.ScrollRow = 1501
ActiveWindow.ScrollRow = 1616
ActiveWindow.ScrollRow = 1731
ActiveWindow.ScrollRow = 1845
ActiveWindow.ScrollRow = 1960
ActiveWindow.ScrollRow = 2075
ActiveWindow.ScrollRow = 1960
ActiveWindow.ScrollRow = 1845
ActiveWindow.ScrollRow = 1616


Selection.EntireRow.Insert

Application.Run_ "Reordering things
appropriately.xls'!zzzzzzzzzzzzzzzzzzzzYmiranotherrecursivityanotherrecursivity"
Application.Run_"Reordering things
appropriately.xls'!zzzzzzzzzzYmiranotherrecursivityrecursivity"

End Sub

Cells.Find(What:="Ymir", After=ActiveCell, LookIn:=x1Formulas,
LookAt_:x1Part, SearchOrder:=x1ByRows, SearchDirection:=x1Next,
MatchCase:=_False, SearchFormat:=False).Activate
ActiveCell.Offset(0,1).Range("A1").Select
ActiveCell.FormulaR1C1="=SUM(R[-400]C[-3]:RC[-3])'
ActiveCell.Offset(1,0).Range("A1").Select
Cells.Find(What:="Ymir", After=ActiveCell, LookIn:=x1Formulas,
LookAt_:x1Part, SearchOrder:=x1ByRows, SearchDirection:=x1Next,
MatchCase:=_False, SearchFormat:=False).Activate
ActiveCell.Offset(0,1).Range("A1").Select
ActiveCell.FormulaR1C1="=SUM(R[-400]C[-3]:RC[-3])"
ActiveCell.Offset(1,0).Range("A1").Select
End Sub

Application.Run_
"Reordering things
appropriately.xls'!Findymirandaddthe400precedingrows"
ActiveWorkbook.Save

ActiveWorkbook.Save
ActiveWorkbook.SaveApplication.Run

Selection.EntireRow.Insert

ActiveCell.Offset(-1,1).Range("A1).Select
ActiveCell.FormulaR1C1 ="=SUM(R[-47]C[-1]:RC[-1])"
ActiveCell.Select
ActiveCell.FormulaR1C1 = "=SUM(R[-47]C[-3]:RC[-3])"
ActiveWindow.SmallScroll Down:=-176

ActiveWindow.ScrollRow = 132

Application.Run"Book2.xls!findymir"

Selection.EntireRow.Insert

Cells.Find(What:="Ymir", After:=ActiveCell, LookIn:=xlFormulas,
LookAt_xlPart, SearchOrder:=xlByRows, SearchDirection=xlNext,
MatchCase=_False, SearchFormat:=False).Activate

Selection.EntireRow.Insert
Cells.Find(What="Ymir", After=ActiveCell, Lookin:=xlFormulas,
LookAt_=x1Part, SearchOrder:=x1ByRows, SearchDirection:=xlNext,
MatchCase:=_False, SearchFormat=False).Activate

Application.Run "AVERAGE COST OF STOCK FOR 2005.xls'!findymir"

Selection.EntireRow.Insert

ActiveWindow.SmallScroll Down:=11
ActiveWindow.SmallScroll Down=-6

Range("G51114:G560000").Select

ActiveCell.Offset(1,)).Range("A1").Select
 
Ad

Advertisements

G

Guest

Mostly looks like meaningless gebberish, which will move around a worksheet
without doing much. Then it inserts a row. Thereafter pieves of code again,
then it tries to find certain words, after which it inserts a formula 400
rows above the active row, and so it goes on. Not a complete VBA program,
rather snippets out of various VBA procedures, I would say

Enda said:
I found these text strings printed out. What would they do if used in
VBA?

What would these do? I found these printed out somewhere.

ActiveWindow.LargeScroll Down:=1
ActiveCell.Offset(13,0).Range("A1").Select
ActiveWindow.LargeScroll Down:=1
ActiveCell.Offset(13,0).Range("A1")Select
ActiveWindow.LargeScroll Down:=1
ActiveCell.Offset(13,0).Range("A1").Select
ActiveWindow.LargeScroll Down:=-1
ActiveCell.Offset(-13,0).Range("A1").Select
ActiveWindow.LargeScroll Down:=-1

ActiveWindow.ScrollRow = 353
ActiveWindow.ScrollRow = 239
ActiveWindow.ScrollRow = 124
ActiveWindow.ScrollRow = 9
ActiveWindow.ScrollRow = 124
ActiveWindow.ScrollRow = 9
Selection.EntireRow.Insert
End Sub
Sub Macro20()

ActiveWindow.ScrollRow = 124
ActiveWindow.ScrollRow = 239
ActiveWindow.ScrollRow = 353
ActiveWindow.ScrollRow = 468
ActiveWindow.ScrollRow = 583
ActiveWindow.ScrollRow = 468
ActiveWindow.ScrollRow = 353
ActiveWindow.ScrollRow = 239
ActiveWindow.ScrollRow = 124
ActiveWindow.ScrollRow = 9
ActiveWindow.ScrollRow = 124
ActiveWindow.ScrollRow = 239
ActiveWindow.ScrollRow = 353
ActiveWindow.ScrollRow = 468
ActiveWindow.ScrollRow = 583
ActiveWindow.ScrollRow = 698
ActiveWindow.ScrollRow = 812
ActiveWindow.ScrollRow = 927
ActiveWindow.ScrollRow = 1042
ActiveWindow.ScrollRow = 1157
ActiveWindow.ScrollRow = 698
ActiveWindow.ScrollRow = 812
ActiveWindow.ScrollRow = 927
ActiveWindow.ScrollRow = 1042
ActiveWindow.ScrollRow = 1157
ActiveWindow.ScrollRow = 1272
ActiveWindow.ScrollRow = 1386
ActiveWindow.ScrollRow = 1501
ActiveWindow.ScrollRow = 1616
ActiveWindow.ScrollRow = 1731
ActiveWindow.ScrollRow = 1845
ActiveWindow.ScrollRow = 1960
ActiveWindow.ScrollRow = 2075
ActiveWindow.ScrollRow = 1960
ActiveWindow.ScrollRow = 1845
ActiveWindow.ScrollRow = 1616


Selection.EntireRow.Insert

Application.Run_ "Reordering things
appropriately.xls'!zzzzzzzzzzzzzzzzzzzzYmiranotherrecursivityanotherrecursivity"
Application.Run_"Reordering things
appropriately.xls'!zzzzzzzzzzYmiranotherrecursivityrecursivity"

End Sub

Cells.Find(What:="Ymir", After=ActiveCell, LookIn:=x1Formulas,
LookAt_:x1Part, SearchOrder:=x1ByRows, SearchDirection:=x1Next,
MatchCase:=_False, SearchFormat:=False).Activate
ActiveCell.Offset(0,1).Range("A1").Select
ActiveCell.FormulaR1C1="=SUM(R[-400]C[-3]:RC[-3])'
ActiveCell.Offset(1,0).Range("A1").Select
Cells.Find(What:="Ymir", After=ActiveCell, LookIn:=x1Formulas,
LookAt_:x1Part, SearchOrder:=x1ByRows, SearchDirection:=x1Next,
MatchCase:=_False, SearchFormat:=False).Activate
ActiveCell.Offset(0,1).Range("A1").Select
ActiveCell.FormulaR1C1="=SUM(R[-400]C[-3]:RC[-3])"
ActiveCell.Offset(1,0).Range("A1").Select
End Sub

Application.Run_
"Reordering things
appropriately.xls'!Findymirandaddthe400precedingrows"
ActiveWorkbook.Save

ActiveWorkbook.Save
ActiveWorkbook.SaveApplication.Run

Selection.EntireRow.Insert

ActiveCell.Offset(-1,1).Range("A1).Select
ActiveCell.FormulaR1C1 ="=SUM(R[-47]C[-1]:RC[-1])"
ActiveCell.Select
ActiveCell.FormulaR1C1 = "=SUM(R[-47]C[-3]:RC[-3])"
ActiveWindow.SmallScroll Down:=-176

ActiveWindow.ScrollRow = 132

Application.Run"Book2.xls!findymir"

Selection.EntireRow.Insert

Cells.Find(What:="Ymir", After:=ActiveCell, LookIn:=xlFormulas,
LookAt_xlPart, SearchOrder:=xlByRows, SearchDirection=xlNext,
MatchCase=_False, SearchFormat:=False).Activate

Selection.EntireRow.Insert
Cells.Find(What="Ymir", After=ActiveCell, Lookin:=xlFormulas,
LookAt_=x1Part, SearchOrder:=x1ByRows, SearchDirection:=xlNext,
MatchCase:=_False, SearchFormat=False).Activate

Application.Run "AVERAGE COST OF STOCK FOR 2005.xls'!findymir"

Selection.EntireRow.Insert

ActiveWindow.SmallScroll Down:=11
ActiveWindow.SmallScroll Down=-6

Range("G51114:G560000").Select

ActiveCell.Offset(1,)).Range("A1").Select
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top