ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   VB Crash - Little Bit Of Fun (https://www.excelbanter.com/excel-discussion-misc-queries/143479-vbulletin-crash-little-bit-fun.html)

RajenRajput1

VB Crash - Little Bit Of Fun
 
Hello

I've been messing around with VB and managed to write a code which crashes
my pc, any reason why ???

I have a dual core 2.5 ghz, vista and excel 2007. Screen went white and
froze for 10-15 seconds.

Maybe someone else could try and see if it happens to them? Surely I didnt
overload or confuse Excel with this;

For s = 0 To 65535 Step 5

Cells(4, 4).Interior.Pattern = xlSolid
Cells(4, 4).Interior.Color = s

Next s

Thanks

joel

VB Crash - Little Bit Of Fun
 
Another office 2007 problem. works fine with 2003.

"RajenRajput1" wrote:

Hello

I've been messing around with VB and managed to write a code which crashes
my pc, any reason why ???

I have a dual core 2.5 ghz, vista and excel 2007. Screen went white and
froze for 10-15 seconds.

Maybe someone else could try and see if it happens to them? Surely I didnt
overload or confuse Excel with this;

For s = 0 To 65535 Step 5

Cells(4, 4).Interior.Pattern = xlSolid
Cells(4, 4).Interior.Color = s

Next s

Thanks


Bob Flanagan

VB Crash - Little Bit Of Fun
 
Works fine if you put

Application.Screenupdating = false

before your For. Sounds like you are over loading Excel's ability to update
the screen as your code requires it to refresh the screen over 13,000
times.....

Bob Flanagan
Macro Systems
144 Dewberry Drive
Hockessin, Delaware, U.S. 19707

Phone: 302-234-9857, cell 302-584-1771
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel

"RajenRajput1" wrote in message
...
Hello

I've been messing around with VB and managed to write a code which crashes
my pc, any reason why ???

I have a dual core 2.5 ghz, vista and excel 2007. Screen went white and
froze for 10-15 seconds.

Maybe someone else could try and see if it happens to them? Surely I
didnt
overload or confuse Excel with this;

For s = 0 To 65535 Step 5

Cells(4, 4).Interior.Pattern = xlSolid
Cells(4, 4).Interior.Color = s

Next s

Thanks




RajenRajput1

VB Crash - Little Bit Of Fun
 
Looks like we've gone 4 years back, not 4 years forward



"Joel" wrote:

Another office 2007 problem. works fine with 2003.

"RajenRajput1" wrote:

Hello

I've been messing around with VB and managed to write a code which crashes
my pc, any reason why ???

I have a dual core 2.5 ghz, vista and excel 2007. Screen went white and
froze for 10-15 seconds.

Maybe someone else could try and see if it happens to them? Surely I didnt
overload or confuse Excel with this;

For s = 0 To 65535 Step 5

Cells(4, 4).Interior.Pattern = xlSolid
Cells(4, 4).Interior.Color = s

Next s

Thanks


RajenRajput1

VB Crash - Little Bit Of Fun
 
Its a shame that your line of code doesn't allow the colors to change on the
screen

But its good to know that code


I placed another for loop inside the original, just a dummy to slow it down,
and it worked, but obviously not very efficient



"Bob Flanagan" wrote:

Works fine if you put

Application.Screenupdating = false

before your For. Sounds like you are over loading Excel's ability to update
the screen as your code requires it to refresh the screen over 13,000
times.....

Bob Flanagan
Macro Systems
144 Dewberry Drive
Hockessin, Delaware, U.S. 19707

Phone: 302-234-9857, cell 302-584-1771
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel

"RajenRajput1" wrote in message
...
Hello

I've been messing around with VB and managed to write a code which crashes
my pc, any reason why ???

I have a dual core 2.5 ghz, vista and excel 2007. Screen went white and
froze for 10-15 seconds.

Maybe someone else could try and see if it happens to them? Surely I
didnt
overload or confuse Excel with this;

For s = 0 To 65535 Step 5

Cells(4, 4).Interior.Pattern = xlSolid
Cells(4, 4).Interior.Color = s

Next s

Thanks






All times are GMT +1. The time now is 08:19 PM.

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