View Single Post
  #3   Report Post  
Old May 21st 07, 01:51 PM posted to microsoft.public.excel.misc
Bob Flanagan Bob Flanagan is offline
external usenet poster
 
First recorded activity by ExcelBanter: Dec 2006
Posts: 340
Default 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