F
fieldsy73
I'm trying to run a macro created by an ex-employee but after weeks of
successfully running, the macro is now creating error messages. I
think the error may have arisen when I inadvertently chose to save
changes to the sheet which contains the macro. Unfortunately, I have
no experience fo VBA coding and neither does anyone else at my place
of work. I desperately need help otherwise I can't run a suite of
reports which are required daily. The first error code starts at the
line;
Cells(50, 2).Select
Selection.End(xlDown).Select
ActiveCell.Offset(2, -1).Select
I've been advised to change this to
lastRow = Range("b65536").End(xlUp).Row
range ("b50:b" & lastRow).select
However, it then highlights the next line of code
Selection.TextToColumns Destination:=Cells(1, 1),
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=True, Space:=True,
Other:=True, _
OtherChar:="(", FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3,
9)), TrailingMinusNumbers:=True
Any help anyone could offer would be greatly appreciated.
John
successfully running, the macro is now creating error messages. I
think the error may have arisen when I inadvertently chose to save
changes to the sheet which contains the macro. Unfortunately, I have
no experience fo VBA coding and neither does anyone else at my place
of work. I desperately need help otherwise I can't run a suite of
reports which are required daily. The first error code starts at the
line;
Cells(50, 2).Select
Selection.End(xlDown).Select
ActiveCell.Offset(2, -1).Select
I've been advised to change this to
lastRow = Range("b65536").End(xlUp).Row
range ("b50:b" & lastRow).select
However, it then highlights the next line of code
Selection.TextToColumns Destination:=Cells(1, 1),
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=True, Space:=True,
Other:=True, _
OtherChar:="(", FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3,
9)), TrailingMinusNumbers:=True
Any help anyone could offer would be greatly appreciated.
John