# uncommon use of Excel



## erik.van.geit (Aug 4, 2005)

Hi, guys, gals and gurus!

Some weeks ago my son decided to try to make a cartoon-movie.
To view his little movie I created this.
(delay not working properly, because loading of pictures takes some time, I think)

```
Option Explicit

Sub filmpje()
Dim pic1 As Object, pic2 As Object
Dim nr As Integer
Dim x As Integer
Dim starttime As Double

Const map = "C:\WINDOWS\Desktop\filmpje\"
Const FirstPicNr = 1
Const LastPicNr = 500
Const delay = 1 / 60 / 60 / 24 / 10
    Application.DisplayFullScreen = True
Range("A1").Select
Set pic1 = ActiveSheet.Pictures.Insert(map & FirstPicNr & ".jpg")
ActiveWindow.Zoom = 120

For nr = FirstPicNr To LastPicNr Step 3
Set pic2 = pic1
Set pic1 = ActiveSheet.Pictures.Insert(map & nr & ".jpg")

starttime = Timer
Do
Loop While Timer - starttime < delay
pic2.Delete
Next nr

pic1.Delete
    Application.DisplayFullScreen = False
End Sub
```

Did you ever use Excel for "non-excel-purposes" ?

just curious !!
Erik


----------



## Smitty (Aug 5, 2005)

> Did you ever use Excel for "non-excel-purposes" ?


If you mean for screwing around, then ABSOLUTELY, and I still do!  (Until I get a grasp on VS 2005 that is...  )

And I think anyone who knows what Excel can do (especially with VBA) would agree.

Now, what's the craziest thing you've done in Excel?  (Hmmmm...This kinda' goes to the pranks thread.... :wink: )

Take care Erik,

Smitty


----------



## just_jon (Aug 5, 2005)

Screensaver -

<font face=Courier New><SPAN style="color:#00007F">Sub</SPAN> SS()
    Sheets("SSM").Activate
    <SPAN style="color:#00007F">On</SPAN> <SPAN style="color:#00007F">Error</SPAN> <SPAN style="color:#00007F">GoTo</SPAN> Xit
    Application.EnableCancelKey = xlErrorHandler
    <SPAN style="color:#00007F">Dim</SPAN> i <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Integer</SPAN>, j <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Integer</SPAN>, k <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Integer</SPAN>, oldk <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Integer</SPAN>
    ActiveWindow.Zoom = 50
    <SPAN style="color:#00007F">While</SPAN> <SPAN style="color:#00007F">True</SPAN>
reset:
        i = Int((90 - 4 + 1) * Rnd + 4)
        j = Int((37 - 3 + 1) * Rnd + 3)
        k = Int((56 - 1 + 1) * Rnd + 1)
        <SPAN style="color:#00007F">If</SPAN> k = oldk <SPAN style="color:#00007F">Then</SPAN> <SPAN style="color:#00007F">GoTo</SPAN> reset
        oldk = k
        Cells(i, j).Interior.ColorIndex = k
    <SPAN style="color:#00007F">Wend</SPAN>
Xit:
    Cells.Select
    Selection.Interior.ColorIndex = 2
    Range("C4:AK90").Select
    <SPAN style="color:#00007F">With</SPAN> Selection.Borders(xlEdgeLeft)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">With</SPAN>
    <SPAN style="color:#00007F">With</SPAN> Selection.Borders(xlEdgeTop)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">With</SPAN>
    <SPAN style="color:#00007F">With</SPAN> Selection.Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">With</SPAN>
    <SPAN style="color:#00007F">With</SPAN> Selection.Borders(xlEdgeRight)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">With</SPAN>
    ActiveWindow.Zoom = 100
    Range("A1").Select
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN>
</FONT>


----------



## hostelowner (Aug 5, 2005)

*how do i run it.*

how do i use this?


----------



## Von Pookie (Aug 5, 2005)

Copy the code, paste it into a module and then run the macro.


----------



## erik.van.geit (Aug 5, 2005)

just_jon,
I'm getting blind 
just remembered another one
http://www.mrexcel.com/board2/viewtopic.php?t=87043&postdays=0&postorder=asc&start=29

kind regards,
Erik


----------



## just_jon (Aug 5, 2005)

There should actually be a randomize statement in there, but I use it so infrequently I never notice!


----------



## Chris Davison (Aug 11, 2005)

there was a post a long while ago from a guy who wanted excel to randomise which restaurant him and his wife went to in the evenings..... that's probably the weirdest use of excel I've seen publicly!


----------



## fairwinds (Aug 11, 2005)

I have two colleagues that use to resize the grid and play tick-tack-toe with whiteboard pen directly on the screen...


----------



## erik.van.geit (Aug 11, 2005)

> I have two colleagues that use to resize the grid and play tick-tack-toe with whiteboard pen directly on the screen...


flatscreen put horizontally on the table !?


----------



## fairwinds (Aug 11, 2005)

erik.van.geit said:
			
		

> flatscreen put horizontally on the table !?



Hm no, standard screen and eraseable white board marker...
maybe i called the game with wrong name, you put X and O to have 5 in a row, never move just add new marks.


----------



## erik.van.geit (Aug 11, 2005)

I've heard also the name "MORPION" for 5-in-a-row

http://mathworld.wolfram.com/Tic-Tac-Toe.html


----------

