Apart from the fact that the For ... Next loop seems ill-constructed and ro
is not set, surely, it is the Msgbox that makes it slow, haviun g to respond
each time? The data processed is sm all so it should be quick in essence.
Also, not a good idea to have variables called row, column, value. Try this
Dim iCol As Integer
Dim iRow As Integer
Dim myValue As String
Application.ScreenUpdating = False
iRow = 1
For iCol = 4 To 44
myValue = myValue = Cells(iRow,iCol).Value & vbNewline
Next iCol
Application.ScreenUpdating = True
MsgBox (myValue)
--
HTH
Bob Phillips
"persenena" wrote
in message ...
Hello
I have strange problem with this vba script
Values in cells are numeric or string like 1, a2, aa, 3 etc.
Each loop takes ~10sec on 2.5 GHz Pentium
Code:
--------------------
Dim column As Integer
Dim row As Integer
Dim value As String
Application.ScreenUpdating = False
For column = 4 To 44
value = Cells(row,column ).Value
MsgBox (value)
Next sarake
Application.ScreenUpdating = True
--------------------
Any suggestions on how to make it run faster ?
Nevermind I got it workin :D stupid me
--
persenena
------------------------------------------------------------------------
persenena's Profile:
http://www.excelforum.com/member.php...o&userid=24910
View this thread: http://www.excelforum.com/showthread...hreadid=384484