T
T De Villiers
I am in worksheet "Test", and the following code is within thi
worksheet,
a problem arises when I move to another worksheet "shell (S)"
I get message "Run-time error '1004' Application-defined o
object-defined error' which I believe is with the asterixed line.
Sub printtariq()
a = Cells.Find("WorkOrder").Column
b = Cells.Find("CostC").Column
c = Cells.Find("PaperSize").Column
d = Cells.Find("PaperWeight").Column
e = Cells.Find("NoBW").Column
f = Cells.Find("printtype").Column
lastrow = Range("A65500").End(xlUp).Row
lastcol = Range("IV1").End(xlToLeft).Column
Cells(1, lastcol + 1) = "x"
Cells(1, lastcol + 1).Font.Bold = True
g = Cells.Find("x").Column
'For i = 2 To lastrow
'Cells(i, g) = Right(Cells(i, a), Len(Cells(i, a)) - 1)
'Next
***Sheets("shell (S)").Range("D23").Select
End Su
worksheet,
a problem arises when I move to another worksheet "shell (S)"
I get message "Run-time error '1004' Application-defined o
object-defined error' which I believe is with the asterixed line.
Sub printtariq()
a = Cells.Find("WorkOrder").Column
b = Cells.Find("CostC").Column
c = Cells.Find("PaperSize").Column
d = Cells.Find("PaperWeight").Column
e = Cells.Find("NoBW").Column
f = Cells.Find("printtype").Column
lastrow = Range("A65500").End(xlUp).Row
lastcol = Range("IV1").End(xlToLeft).Column
Cells(1, lastcol + 1) = "x"
Cells(1, lastcol + 1).Font.Bold = True
g = Cells.Find("x").Column
'For i = 2 To lastrow
'Cells(i, g) = Right(Cells(i, a), Len(Cells(i, a)) - 1)
'Next
***Sheets("shell (S)").Range("D23").Select
End Su