Macro Debug - Personal macro not opening

G

Guest

I'm having a problem with a macro which is pasted below
(my apologies for the size of it. i'm not sure what is
important and what isn't)
when i run the debug vbasic takes me to this line(its
highlighted yellow)
ActiveWindow.ScrollRow = -22

Further to this problem my personal macro workbook doesnt'
seem to be opening with all workbook files. does anyone
know what this could be from ?
much appreciated




Cellsplit Macro
' Macro recorded 4/5/2004 by USR
'

'
Columns("J:J").Select
Selection.Cut
Columns("G:G").Select
Selection.Insert Shift:=xlToRight
Columns("J:J").Select
Selection.Cut
Columns("H:H").Select
Selection.Insert Shift:=xlToRight
ActiveWindow.SmallScroll ToRight:=10
ActiveWindow.Zoom = 85
Columns("T:T").Select
Selection.Cut
Columns("K:K").Select
Selection.Insert Shift:=xlToRight
Columns("S:S").Select
Selection.Cut
Columns("L:L").Select
Selection.Insert Shift:=xlToRight
Columns("P:p").Select
Selection.Cut
Columns("M:M").Select
Selection.Insert Shift:=xlToRight
Columns("R:R").Select
Selection.Cut
Columns("N:N").Select
Selection.Insert Shift:=xlToRight
Columns("O:p").Select
Selection.Cut
Columns("W:W").Select
Selection.Insert Shift:=xlToRight
Columns("T:T").Select
Selection.Cut
Columns("S:S").Select
Selection.Insert Shift:=xlToRight
Columns("R:R").Select
Selection.Cut
Columns("O:O").Select
Selection.Insert Shift:=xlToRight
Columns("R:R").Select
Selection.Cut
Columns("P:p").Select
Selection.Insert Shift:=xlToRight
ActiveWindow.Zoom = 100
Columns("F:F").Select
Range("F3").Activate
Selection.Delete Shift:=xlToLeft
Range("F10").Select
ActiveCell.FormulaR1C1 = "RTG"
With ActiveCell.Characters(Start:=1, Length:=3).Font
.Name = "MS Sans Serif"
.FontStyle = "Bold"
.Size = 8
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Range("G10").Select
ActiveCell.FormulaR1C1 = "(000's)"
With ActiveCell.Characters(Start:=1, Length:=7).Font
.Name = "MS Sans Serif"
.FontStyle = "Bold"
.Size = 8
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Range("F10:G10").Select
Selection.Copy
Range(Selection, Selection.End(xlToRight)).Select
Range("E10").Select
Application.CutCopyMode = False
Range("G3").Select
Selection.EntireColumn.Insert
Range("H3").Select
Selection.End(xlDown).Select
Range("H10").Select
Selection.Copy
Range("G10").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("H10").Select
Selection.End(xlUp).Select
Selection.End(xlUp).Select
Range("I1").Select
Selection.EntireColumn.Insert
Range("K1").Select
Selection.EntireColumn.Insert
Range("M1").Select
Selection.EntireColumn.Insert
Range("O1").Select
Selection.EntireColumn.Insert
Range("Q1").Select
Selection.EntireColumn.Insert
Range("S1").Select
Selection.EntireColumn.Insert
Range("U1").Select
Selection.EntireColumn.Insert
Range("W1").Select
Selection.EntireColumn.Insert
Range("Y1").Select
Selection.EntireColumn.Insert
Range("AA1").Select
Selection.EntireColumn.Insert
Range("AC1").Select
Selection.EntireColumn.Insert
Range("AE1").Select
Selection.EntireColumn.Insert
Range("AG1").Select
Selection.EntireColumn.Insert
Range("AI1").Select
Selection.EntireColumn.Insert
Range("AK1").Select
Selection.EntireColumn.Insert
ActiveWindow.SmallScroll Down:=-6
Range("F10:G10").Select
Selection.Copy
Range("F10:AT10").Select
Range(Selection, Selection.End(xlToLeft)).Select
Range("F10:AK10").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("F11").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.TextToColumns Destination:=Range("F11"),
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote,
ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False,
Other:=True, OtherChar _
:="" & Chr(10) & "", FieldInfo:=Array(Array(1, 1),
Array(2, 1))
Range("H11").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.TextToColumns Destination:=Range("H11"),
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote,
ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False,
Other:=True, OtherChar _
:="" & Chr(10) & "", FieldInfo:=Array(Array(1, 1),
Array(2, 1))
Range("J11").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.TextToColumns Destination:=Range("J11"),
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote,
ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False,
Other:=True, OtherChar _
:="" & Chr(10) & "", FieldInfo:=Array(Array(1, 1),
Array(2, 1))
Range("L11").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.TextToColumns Destination:=Range("L11"),
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote,
ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False,
Other:=True, OtherChar _
:="" & Chr(10) & "", FieldInfo:=Array(Array(1, 1),
Array(2, 1))
ActiveWindow.SmallScroll ToRight:=12
Range("N11").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.TextToColumns Destination:=Range("N11"),
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote,
ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False,
Other:=True, OtherChar _
:="" & Chr(10) & "", FieldInfo:=Array(Array(1, 1),
Array(2, 1))
Range("P11").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.TextToColumns Destination:=Range("P11"),
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote,
ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False,
Other:=True, OtherChar _
:="" & Chr(10) & "", FieldInfo:=Array(Array(1, 1),
Array(2, 1))
Range("R11").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.TextToColumns Destination:=Range("R11"),
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote,
ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False,
Other:=True, OtherChar _
:="" & Chr(10) & "", FieldInfo:=Array(Array(1, 1),
Array(2, 1))
Range("T11").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.TextToColumns Destination:=Range("T11"),
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote,
ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False,
Other:=True, OtherChar _
:="" & Chr(10) & "", FieldInfo:=Array(Array(1, 1),
Array(2, 1))
Range("V11").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.TextToColumns Destination:=Range("V11"),
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote,
ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False,
Other:=True, OtherChar _
:="" & Chr(10) & "", FieldInfo:=Array(Array(1, 1),
Array(2, 1))
Range("X11").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.TextToColumns Destination:=Range("X11"),
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote,
ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False,
Other:=True, OtherChar _
:="" & Chr(10) & "", FieldInfo:=Array(Array(1, 1),
Array(2, 1))
Range("Z11").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.TextToColumns Destination:=Range("Z11"),
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote,
ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False,
Other:=True, OtherChar _
:="" & Chr(10) & "", FieldInfo:=Array(Array(1, 1),
Array(2, 1))
ActiveWindow.SmallScroll ToRight:=11
Range("AB11").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.TextToColumns Destination:=Range("AB11"),
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote,
ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False,
Other:=True, OtherChar _
:="" & Chr(10) & "", FieldInfo:=Array(Array(1, 1),
Array(2, 1))
Range("AD11").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.TextToColumns Destination:=Range("AD11"),
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote,
ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False,
Other:=True, OtherChar _
:="" & Chr(10) & "", FieldInfo:=Array(Array(1, 1),
Array(2, 1))
Range("AF11").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.TextToColumns Destination:=Range("AF11"),
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote,
ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False,
Other:=True, OtherChar _
:="" & Chr(10) & "", FieldInfo:=Array(Array(1, 1),
Array(2, 1))
Range("AH11").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.TextToColumns Destination:=Range("AH11"),
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote,
ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False,
Other:=True, OtherChar _
:="" & Chr(10) & "", FieldInfo:=Array(Array(1, 1),
Array(2, 1))
Range("AJ11").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.TextToColumns Destination:=Range("AJ11"),
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote,
ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False,
Other:=True, OtherChar _
:="" & Chr(10) & "", FieldInfo:=Array(Array(1, 1),
Array(2, 1))
Range("G7").Select
ActiveCell.FormulaR1C1 = "10"
Range("G7").Select
Selection.Copy
Range("G7").Select
Application.CutCopyMode = False
Range("G7").Select
Selection.Copy
Range("G11").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWindow.ScrollRow = 1
ActiveWindow.SmallScroll ToRight:=4
Range("G11:G65536,I11").Select
Range("I11").Activate
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWindow.ScrollRow = 1
Range("G11:G65536,I11:I65536,K11").Select
Range("K11").Activate
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWindow.ScrollRow = -22
ActiveWindow.ScrollRow = 1
Range("G11:G65536,I11:I65536,K11:K65536,M11").Select
Range("M11").Activate
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWindow.ScrollRow = 1
Range
("G11:G65536,I11:I65536,K11:K65536,M11:M65536,O11").Select
Range("O11").Activate
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWindow.ScrollRow = 1
Range
("G11:G65536,I11:I65536,K11:K65536,M11:M65536,O11:O65536,Q1
1").Select
Range("Q11").Activate
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWindow.SmallScroll ToRight:=12
ActiveWindow.ScrollRow = 1
Range
("G11:G65536,I11:I65536,K11:K65536,M11:M65536,O11:O65536,Q1
1:Q65536,S11"). _
Select
Range("S11").Activate
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWindow.ScrollRow = 1
Range( _
"G11:G65536,I11:I65536,K11:K65536,M11:M65536,O11:O6
5536,Q11:Q65536,S11:S65536,U11" _
).Select
Range("U11").Activate
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWindow.ScrollRow = 1
Range( _
"G11:G65536,I11:I65536,K11:K65536,M11:M65536,O11:O6
5536,Q11:Q65536,S11:S65536,U11:U65536,W11" _
).Select
Range("W11").Activate
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWindow.ScrollRow = 1
Range( _
"G11:G65536,I11:I65536,K11:K65536,M11:M65536,O11:O6
5536,Q11:Q65536,S11:S65536,U11:U65536,W11:W65536,Y11" _
).Select
Range("Y11").Activate
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWindow.ScrollRow = 1
Range( _
"G11:G65536,I11:I65536,K11:K65536,M11:M65536,O11:O6
5536,Q11:Q65536,S11:S65536,U11:U65536,W11:W65536,Y11:Y65536
,AA11" _
).Select
Range("AA11").Activate
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWindow.ScrollRow = 1
Range( _
"G11:G65536,I11:I65536,K11:K65536,M11:M65536,O11:O6
5536,Q11:Q65536,S11:S65536,U11:U65536,W11:W65536,Y11:Y65536
,AA11:AA65536,AC11" _
).Select
Range("AC11").Activate
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWindow.SmallScroll ToRight:=10
ActiveWindow.ScrollRow = 1
Range( _
"G11:G65536,I11:I65536,K11:K65536,M11:M65536,O11:O6
5536,Q11:Q65536,S11:S65536,U11:U65536,W11:W65536,Y11:Y65536
,AA11:AA65536,AC11:AC65536,AE11" _
).Select
Range("AE11").Activate
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWindow.ScrollRow = 1
Range( _
"G11:G65536,I11:I65536,K11:K65536,M11:M65536,O11:O6
5536,Q11:Q65536,S11:S65536,U11:U65536,W11:W65536,Y11:Y65536
,AA11:AA65536,AC11:AC65536,AE11:AE65536,AG11" _
).Select
Range("AG11").Activate
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWindow.ScrollRow = 1
Range( _
"G11:G65536,I11:I65536,K11:K65536,M11:M65536,O11:O6
5536,Q11:Q65536,S11:S65536,U11:U65536,W11:W65536,Y11:Y65536
,AA11:AA65536,AC11:AC65536,AE11:AE65536,AG11:AG65536,AI11"
_
).Select
Range("AI11").Activate
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWindow.ScrollRow = 1
Range( _
"G11:G65536,I11:I65536,K11:K65536,M11:M65536,O11:O6
5536,Q11:Q65536,S11:S65536,U11:U65536,W11:W65536,Y11:Y65536
,AA11:AA65536,AC11:AC65536,AE11:AE65536,AG11:AG65536,AI11:A
I65536,AK11" _
).Select
Range("AK11").Activate
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWindow.ScrollRow = 1
Selection.PasteSpecial Paste:=xlValues,
Operation:=xlDivide, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Range("F11").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.NumberFormat = "0"
Range("F7").Select
ActiveWindow.SmallScroll ToRight:=22
ActiveWindow.SmallScroll Down:=-15
End Sub
 

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