Hi to all,
I have a program where i need to assing array values to worksheet cells.The code is in Excel VBA.
I don't why it is taking lot of time to update 1 row of data.
When i checked the Taskmanager it is taking 50% of Excel.exe.
The sample code is
Please let me know how can i handle this in excel vba.Code:With Worksheets("AAA") For intCnt = 1 To UBound(myarray) For intC = 1 To myrange.Columns.count Select Case myrange.Cells(1, intC) Case "A" .Cells(intR, intC).Value = intCnt Case "B" .Cells(intR, intC).Value = myarray(intCnt).ResName Case "C" .Cells(intR, intC).Value = myarray(intCnt).Weeknum End Select Next intR = intR + 1 Next End With
Last edited by royUK; 07-15-2008 at 07:07 AM. Reason: clarity
As I said in my reply to your PM, please read the Forum Rules - you must use Code tags when posting code here.
Have you set ll your variables & how?
Last edited by royUK; 07-15-2008 at 07:10 AM.
Hope that helps.
RoyUK
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel consulting, free examples and tutorials visit Excel Consulting-Excel VBA
Check out the free Excel Toolbar
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
Code Tags: Make your code easier for us to read
I have declared a userdefined variable Type.
There will be a set of Type values in my program.
So i have used arrays to store it.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks