![]() |
Run-time error-2147417848 (8001
I am writing an application that creates a number of workbooks and links
cells in them to a "Main" workbook. The workbooks are populated from a Master List contained in another workbook. The code works well on systems having 512 MB RAM, but gives the above error when run on systems even with 512 MB RAM. Other system details at the point of occurance of the error reported by the Task Manager are 1. Excel is using 85 €“ 94 % of processor time 2. 16,364 K memory (winword 19,028 K appears to be normal) 3. Peak CPU usage before break point is about 52% and page file usage is 89.2MB 4. At break point Page file usage is 89.5MB. Code at the point of error is SUWb.Sheets(SUName).Activate Range(Cells(FIRSTROW, SERCOL), Cells(FIRSTROW + nos - 1, SERCOL)).Select Selection.EntireRow.Insert MasterWb.Sheets(Catg).Activate ActiveSheet.Range(Cells(StartRow, SERCOL), _ Cells(StartRow + nos - 1, FLYSCOL)).Copy SUWb.Sheets(SUName).Activate ActiveSheet.Paste Destination:=Cells(FIRSTROW, SERCOL) NB - caps are all constants. - appx 30 to 40 rows are usually pasted, each with about 4 columns. On occurance of the error, Excel hangs, but the other applications run normally. I have to end task to get out. Would be grateful for help on this please. Jai |
Run-time error'-2147417848 (80010108)':
It could be all the Activate's, Select's, and screen updating causing
the memory consumption. The code you wrote could be condensed into: Application.ScreenUpdating = False SUWb.Sheets(SUName).Rows(FIRSTROW & ":" & FIRSTROW + nos).Copy MasterWb.Sheets(Catg).Rows(FIRSTROW & ":" & FIRSTROW).Insert shift:=xlDown Application.ScreenUpdating = True ---- Nick Hebb BreezeTree Software http://www.breezetree.com |
Run-time error'-2147417848 (80010108)':
Hi Nick,
Thanks a lot for your inputs. They helped very much. Firstly, I tried simply disabling screen updates. This allowed a "more graceful hang" - in the sense that Excel could now close the VBA code window and the source & destination workbooks. Excel could not exit however and required the Task Manager to terminate. The row copy and insert worked like a shot. Only, I do not want to copy the complete row information. Will find a way to block out. Will column hide help?? But the larger problem is still interesting. I have screen shots of various stages. can I post them somewhere so that the "background boys" can take a look at Excel itself to see how it can act with more grace? Thanks once again for your very helpful inputs Jai "Nick Hebb" wrote: It could be all the Activate's, Select's, and screen updating causing the memory consumption. The code you wrote could be condensed into: Application.ScreenUpdating = False SUWb.Sheets(SUName).Rows(FIRSTROW & ":" & FIRSTROW + nos).Copy MasterWb.Sheets(Catg).Rows(FIRSTROW & ":" & FIRSTROW).Insert shift:=xlDown Application.ScreenUpdating = True ---- Nick Hebb BreezeTree Software http://www.breezetree.com |
All times are GMT +1. The time now is 07:01 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com