ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Buffer Overflow (https://www.excelbanter.com/excel-programming/399204-buffer-overflow.html)

Boboz

Buffer Overflow
 
What should I do to stop my macro from crashing out with a buffer overflow? I
find that even the following simple macro will generate one:

Sub Macro1()
ActiveWorkbook.Colors(11) = RGB(0, 85, 163)
End Sub

I am running Office 2003 under XP, but I get the same with Office 2000 under
Vista

Zone[_3_]

Buffer Overflow
 
The macro runs fine for me in Excel 2003 with Windows XP. Just a hunch, try
it with a new, empty workbook. James

"Boboz" wrote in message
...
What should I do to stop my macro from crashing out with a buffer
overflow? I
find that even the following simple macro will generate one:

Sub Macro1()
ActiveWorkbook.Colors(11) = RGB(0, 85, 163)
End Sub

I am running Office 2003 under XP, but I get the same with Office 2000
under
Vista




Boboz

Buffer Overflow
 
Thanks for that. I am finding that the result is machine dependent, and has
nothing obvious to do with what else may be running at the time. I am looking
for a "fix" to skip the instruction if its going to cause a problem, or to
set buffer size to avoid it - if possible.

Does anybody understand why these things happen?

"Zone" wrote:

The macro runs fine for me in Excel 2003 with Windows XP. Just a hunch, try
it with a new, empty workbook. James

"Boboz" wrote in message
...
What should I do to stop my macro from crashing out with a buffer
overflow? I
find that even the following simple macro will generate one:

Sub Macro1()
ActiveWorkbook.Colors(11) = RGB(0, 85, 163)
End Sub

I am running Office 2003 under XP, but I get the same with Office 2000
under
Vista






All times are GMT +1. The time now is 04:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com