Hello!
I am at a loss with an excel problem and really need your help.
The following code is giving me a headache:
In the cells (Tab1) are columnnumbers. These columnnumbers indicate what columns i copy from Tab2 into a new worksheet. I insert a new column in the new worksheet and copy the column from Tab2 into this column.For x = 12 To 18
If TAB1.Cells(x, y) <> "" Then
z = TAB1.Cells(x, y).Value
Worksheets(Worksheets.Count).Columns(4).Insert
TAB2.Columns(z).Copy Destination:=Worksheets(Worksheets.Count).Columns(4)
boli = 1
intcount = boli + intcount
End If
Next x
This code is part of a big tool and running it on excel2007 in need approx 1 minute to make 100 new sheets with the columns i want. Doing it on excel 2010 i need about 4 HOURS!!!!
After uncommenting the line
excel2010 is as fast as 2007, so it must have something to do with this line.Worksheets(Worksheets.Count).Columns(4).Insert
I already tried to find out what could help so what i found and tried is:
application.calculation = xlmanual
.entirecolumn
i set the printer to document writer
ActiveSheet.DisplayPageBreaks = False
none of these approaches helped.
I would really appreciate if one of you could help me!
Ruediger
Bookmarks