Message 1 of 5
Object was open for read error

Not applicable
07-06-2006
04:19 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
One of my VB6 applications replaces about 200 blocks on a Drawing with a different block type, and copies across the colour to the new block.
In the process of Get Colour of OldBlockX, Get Location of OldBlockX, Get Rotation of OldBlockX, Delete OldBlockX, Place NewBlockX at Location and Rotation, Set Colour of NewBlockX, 200 times in a loop, the following error sometimes (but rarely) appears, at the point of Set Colour:
"Run time error: -2145386418 - Object was open for read"
Does anyone have an idea why this should happen and how to avoid it?
In the process of Get Colour of OldBlockX, Get Location of OldBlockX, Get Rotation of OldBlockX, Delete OldBlockX, Place NewBlockX at Location and Rotation, Set Colour of NewBlockX, 200 times in a loop, the following error sometimes (but rarely) appears, at the point of Set Colour:
"Run time error: -2145386418 - Object was open for read"
Does anyone have an idea why this should happen and how to avoid it?