Link to home
Start Free TrialLog in
Avatar of TelMaco
TelMaco

asked on

What software do I need to create a spreadsheet with hexagonal or octagonal cells?

I think this should be simple...most likely the answer is no.

Can I change the shape of the cells in Excel into hexagons or octagons?  Or is there software out there that runs a spreadsheet with cells of that shape?

If so, where can I get a copy of it and how much is it?

Thank you
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

I have never heard of such a thing (for excel ...)
what would be the purpose of that, just curious...

angel eyes
Hello TelMaco,

I don't think that Excel can change the fundamental shape of a cell.

Regards,

RQuadling
That is not possible using any spreadsheet program. In a graphics program (Visio?), perhaps.  What could you be trying to achieve?
Hi TelMaco,

You're correct - the answer is no. You could add a hexagon or octagon shape, though.

Regards,

Wayne
TelMaco,

Unfortunately, the only changes you can make to the shape of a cell are to the height and width. You can also change the color and the border.

I'm curious, why do you want to change the shape of the cells?

If you want to have only a few hexagons on the worksheet you can use shapes but I'm not sure what you are trying accomplish.

Kevin
Here is a example xls with Octagonal bordering on cells.
Octagonal-Cells.xls
TelMaco,
Depending on your purpose, you may be able to get satisfactory results using a tiled collection of hexagons on top of a spreadsheet. For example, if you were making a board game, you could assign values or color individual tiles using VBA code.

As my esteemed colleagues have already pointed out, you cannot change the basic rectangular shape of the Excel cells themselves. And octagons do not tile (you need a mix of octagons and some other shape).

Could you describe more about the underlying application?

Brad
Hi TelMaco,

Something like the attached file could do fine.

Regards,

LucF
hexagon.xls
PenguinMod,

Actually, they're 3 square tables.

RQuadling
To be fair - it's more like a rectangle... or perhaps 3 cells joined together...
I see, some good suggestions (for excel).
now, does it have to be ms excel?

here a powerpoint suggestion:

angel eyes

hexagonal.ppt.txt
See - it's more like a rectangle or 3 cells joined together...User generated image
If you don't want to do it in Excel, Word can also help out.
Hex-and-Oct.doc
byundt was in his room.

PenguinMod was getting a beer.

I'm still a little puzzled as to your ultimate desired outcome but I am really trying here. See the attached file. Am I close?

Kevin
Q-23654024.xls
Beer might help on this one.

I'd propose getting a copy of Visual Basic Express -- free from Microsoft.

Then you could code anything you like.

How many rows and columns do you need to support? I should be able to whip something up here in a few minutes.
Also.... does it need to run on a Mac?
This seems to be more difficult than we first anticipated... We've called in more help...User generated image
We could really use some more input as to your ultimate goal.

I tried to make my solution a little more fun. Unfortunately there is a small cost in usability.

Kevin
Q-23654024.xls
Kevin,

That's an... interesting solution. However, I'm concerned about the security implications of allowing macros.

And... in a stunning reversal of the usual case... "it *doesn't* work on my machine"

Jeff
Just a random thought... does this need to work on a distributed system? That is, do we need to be able to pass the results across the wire in WCF services?

What endpoints would you prefer?

Have you given any thoughts to the security implications of this paradigm?
Jeff,

I'm surprised that at your level you even need security. I run a lean shop with no security whatsoever and rely on my keen eye for malicious behavior. At my advanced level I can sense such behavior well before it has a chance to have any effect - the CTRL+BREAK key and power button always a moment away from my fingertips. I find the experience much more rich and rewarding. Put more simply, security is for wimps.

Kevin
Did you just call me a wimp?!?!?

I'll have you know that I actually use a real language... none of those sissy Java or C# curly braces for me.

Office is for girly-men. The least you could have done was use a real spreadsheet program -- like one of the Google apps.
Is there such a thing as too much dedication?  Chaosian is working out details on paper... does this help anyone?User generated image
I might want to play around with that indeed to try and improve my previous answer to make sure it's a solid "A"-grade answer.

LucF
Hey!! That's proprietary information!

I demand that the mods remove that image immediately... or I'll have my security team come visit.

That's it.... I'm gonna request an admin look at this question... I've had enough.

And, just for that, I won't even share the brilliant solution I was working on. And my color scheme was *much* nicer than Kevin's.
Avatar of ☠ MASQ ☠
☠ MASQ ☠

<whispers>
Don't believe the photos - they are all playing Splinter Cell! - I think zorvek is winning
</whispers>
Ok, back on subject. Did anyone think about diagonal ones? Now I'll just have a to find a way to color them each in a different color. Suggestions anyone?

LucF
Map1.xls
Those aren't regular polygons. Come on, Luc... read the question.

There's nothing worse than an expert who doesn't answer the question that was asked... sheesh.

Go back to a zone you know something about.
I actually am remembering some other question, of which one of the suggestion solutions might work out here.
a good potion of fairy dust should do the job!!

angel eyes
Chaosian,

Those are regular polygons, just turned 45 degrees.
Anyways, I'm still having issues getting the coloring right. Some fairy dust might do the trick...
LucF
Avatar of TelMaco

ASKER

Holy crap you guys.  I was expecting someone to just post "no" and I'd have given them the 50 points.  I've upped the point value, as I can see this is a group effort.  

Normally when I post I'm looking for help with VBA code I use at my office, but this question was just an idea I was toying with for a game I was designing in Excel.

It basically a replica of a tabletop game, played on a hex map with stat sheets, dice and a measuing tape.  I figured I could write the code for all of the rules to do with the stats, and dice, but I coun't figure out movement of the pieces, other than forward/backward and left/right.  Thus the need for a hex spreadsheet.  

I'm a business analyst so I use Excel alot and am teaching myelf VBA. I just wanted to see if I could learn some more VBA by practicing it in a fun envoronment.  

I'm pretty young, and any programing I've learned has been through trial and error. So sites like this are an amazing resorce. I'm doing this inmy spare time so I'll take a look at the file from  zorvk.  I think I could use something like that.

Also, Chaosian, you are probably right, maybe I should just use something like visal basic express rather than Excel. I just wanted to play in something familiar.

Thanks again guys, I feel I bit sheep-ish for having you go to all this over a game.  But I can see that you enjoy what you do. I know that I have the most fun at work when I am programming.
They are *not* regular polygons. Not all the sides are the same length.

As you can clearly see from the sketches that were STOLEN from me, a regular hexagon has 120 degree angles between each side.

You've got some other bizarre angle involved there.

Guess you shouldn't be looking for points in any of the math zones either.
TelMaco,

Sorry... that last one was to Luc. Didn't mean to sound like I was yelling at you.

We're certainly having a tremendous amount of fun with this question. Believe it or not, we might even get you a solution.
Two questions spring to mind:
1. Has anyone taken merged cells into account?
2. How many beers have you all had exactly?
:)
I drew a hexagonal grid using the Hexgon shape tool, found on the Insert menu.
1)  After drawing one hexagon, copy and paste several copies. Hold the Control key down  and use the arrow keys for fine positioning.
2) Align them using the Align tool on the Page Layout menu. I aligned Center.
3) Select several of the shapes and group them using the Group tool on the Page Layout menu item
4) Copy and paste several of the grouped items

Brad
HexagonalCellsQ-23654024.zip
Avatar of TelMaco

ASKER

I honestly hope that I can find job as fun as you guys.  I only discovered VBA 6 months ago, and I've fallen in love with programming.  Thanks for your efforts!

FYI, I'll be going out for a while, so I wont be able to check or add comments for for several hours.

Stephen
Okay... we just ran the numbers....

The people whose names were linked below the second table photo reperesent about 3% (60 million and change) of all the points  ever earned on EE.

There's your useless trivia for the day.
Stephen,

Good to see you back.
Seeing that you're actually making a game, maybe one of the Mod's in this question can change one of the zones to "Games programming" ;o)

Regards,

LucF
>References to "gentlemen" clearly have no place in this thread.

No kidding ;-)
Humph. Yet another country heard from ;)
Hey!!

Who edited my comment?!??!

Come and see the violence inherent in the system! Help! Help! I'm being repressed!

My first amendment  rights are being violated.

It's a conspiracy.

I *will* be heard... you can't take away my **mmmfff... mmm.. **
I wish I did!

 Bloody peasant!

LucF
>This question needs more Experts.
and more beer ...

PenguinMod, get up !!!
Oh, what a give-away. Did you hear that? Did you hear that, eh? That's what I'm on about. Did you see him repressing me? You saw it, didn't you?
That's not what the beer in your hand says.
<points whore>
 let's spoil the fun, and suggest some real suggestion, hopefully:
 http://www.xtremevbtalk.com/showthread.php?t=21529
 has a project in vb6 for something that looks similar what you are trying to do, but not in excel.
</points whore>

angel eyes
Wasn't there some rule about just links without an explanation would not qualify as a decent answer to a question?

LucF
if I counted correctly, that was just your 5th beer...
so, your reading capabilities must indeed lack a bit :)

however, I admit that the suggestion is likely to fail the "Mac OS" requirements ...

angel eyes
For the record, I think WPF would be a fabulous solution if I knew anything about it.

Button shapes can be changed... somehow... or so I've been told.

Might be fun to look into.
And a little birdie said something about golf.... or was that "four" rather than "fore"?
Angel,

Seems like your counting capabilities are lacking a bit ;o)

LucF
Angel,

I'm more concerned about the WCF web services component and the adherence to WS-Security standards, rather than Mac OS.

Jeff
>Seems like your counting capabilities are lacking a bit ;o)
well, you forgot the one you took over from PM to "protect" him :)

angel eyes
Not pictured: Me
Went to Avila beach, Pismo beach, Arroyo Grande, Oso Flaca lake, Oceano Dunes + beach (the best one by far), Guadalupe, Santa Maria, back to Avila, downtown SLO

Hilarious thread. Maybe with enough beer the cells could look hexagonal? I'm looking at you, PM; can I see some ID?
Careful, PM, or I'll get kodiakbear to buy you flowers.
At the risk of an account suspension...

<shameless points whore>
Have you considered using an RPG Game Map Making software for this - there are both commercial and freeware applications and both may offer a solution you would find acceptable.  http://games.slashdot.org/article.pl?sid=05/04/24/1316212&tid=209
</shameless points whore>
I'll also add that if it's RPG software, it may lead to an appropriate place to obtain the necessary Fairy Dust and allow the first interpretation of this question to become possible... if you look closely enough...
The neophytes are off on tangents again...Since I'm one of the few who actually reads the questions..."I just wanted to see if I could learn some more VBA by practicing it in a fun environment"...

...the new and improved version 2.

No steps, no drawing, no copying or pasting, no grouping, no game platforms, no VB6, no C, C++, C#, Java, or PHP.

Just VBA and fun.

Kevin the PH
Q-23654024V2.xls
Wow, so this is where everyone is...  
modguy,

Even better than this??

LucF
TelMaco,
Being unable to sleep last night, I realized that the "A-team" fixation on hexagons is not essential to the solution to your problem. What you really have asked for is cells that each have six neighbors and which allow movement either vertically or horizontally--but not both, and which also allow movement on a diagonal.

Topologically speaking, you can achieve this result with a brick wall. Rectangular bricks that are staggered on a running bond (see the brickwork picture about halfway down http://www.cmhpf.org/kids/Guideboox/brick.html ) have exactly the features described above.

More to the point, the running bond is quite easy to achieve in Excel. Just merge cells vertically to get the desired shape of the brick. Copy those merged cells down. Copy the column of merged cells and paste it in the adjacent column shifted up or down as required to make the bond pattern.

Brad
Here is an Excel workbook using cell borders and merged cells to simulate a running bond. Note how each merged cell has 6 neighbors--just like hexagonal tiles arranged in a honeycomb.

Brad
RunningBond.xls
Presumably a linked-list is needed in a separate worksheet to enable a cell to know who its' neighbouirs are.  This would take the form of a column for the cell, plus 6 or 8 columns with an entry showing the cell's Northerly neighbour, North West neighbour etc.


moorhouselondon,

ActiveCell.Row             'Number of row that cell is on
ActiveCell.Column        'Number of column that cell is on

'Address of an adjacent cell at lower right
Cells(ActiveCell.Row -nRow,,ActiveCell.Column+nCol)         'nRow=number of rows in each "cell"; nCol=number of columns

Brad
I take the point that it can be done in VBA.  I suppose I am thinking of some of the other topologies possible which have other shapes in between, such as RQuadling's first link, where there may be Rules governing which neighbours are "valid".    Even with shapes all being the same, in a game environment, there may be "blanked off cells" which can be represented by gaps in the neighbours linked list.
Avatar of TelMaco

ASKER

Just some thoughs on what Zorvek has done.  Take a look and let me know your thoughts.

Thanks!

I couldn't seem to uplod the excel file, so its just a picture in word..sorry
Doc1.doc
Avatar of TelMaco

ASKER

Sorry, while I was working on my last comment you huys added a bunch more.  Byundt, I'll take a look at what you've done.  Functionally it seems correct, but not quite what I'm after from a visual perspective.
It sounds like the asker wants to mimic an existing game that uses hexes. This may make the "brick" concept and other topologies somewhat unsuitable.

I'm still convinced that VBA isn't quite the solution for this. I'm not saying it can't be done, I just think there are better options. I'll be messing with a WPF app against VB.NET to see how it turns out.

I think the selection of VB.NET will be similar enough to VBA for Excel that the learning curve shouldn't  be too terrible, especially with the VisualBasic interop namespace imported.

Jeff
Avatar of TelMaco

ASKER

Soooo close!

If we combine what Byundt and Zorvek did:

Use a brick template by merging the appropriate cells ( see Byndt's example)
Then create a hex overlay where the hex's have no fill or are transparent.

The result is a Hex grid, where each hexagon is centered atop a cell.

This allows each "Hex" to appear to act the same as a cell

I think we've got it!  (=

I had to manually move the Hexes around to get the layout just right, wich is a bit of a pain, and the Cell widths and heights need to be absolutely perfect otherwise the small measurements show up rather skewed in a large template.  Perhaps we can now use VBA to format a large grid?

Avatar of TelMaco

ASKER

Here's a simple example:
Hex-template-B.xls
Heres my 2 cents worth just to watch how this goes if nothing else.  I didn't read all the comments here (this is huge!), so even if this isn't even close, I did it for fun...Book1 has 1 short macro that is assigned to each shape...Book2 has 3 different sheets but no macros...Every example was designed so that you can just click on the shape and any value you type will go into the cell (just in case that's what you want)...you can move the cells around (on some of the samples, but not all) and the shape and value will go together...

There are 2 files with different examples...some of them probably not practical to use, depends on how it needs to get used...

Anyway...I had a little time to waste today, so this is what I used it on...


:-)
Albert

Book1.xls
Book2.xls
I took Kevin's workbook and added some code to:
1) Test whether two cells are adjacent
2) Add "inventory" to a cell by clicking on it
3) Shift "inventory" from one cell to another by Shift-clicking on both it and the destination
4) Ask for names of the "players"
5) There is also a macro for the "Next player"

Brad
HexGameQ23654024.xls

Question:
How many top EE experts does it take to make an octagon?

Answer:
Eight with their eight laptops, as seen in the picture above at http:#22245547.
One to borrow a big power-strip from the hotel.
Two to move the tables together.
At least two more to memorialize this unique event with pictures.

oops, off-topic.
Dangit... and here I was working on making hexagons. You mean I've been answering the wrong question again?!?!
Hi all:

Here are some CAD drawing to show the ratio of hex to merged cell sizes:
Starting with a hexagon inscribed in a circle of radius 1 unit
Tile and show the merged cell array from TelMaco's sample file Hex-template-B.xls
The merged cell ratio is 1.5 wide by 1.73205 units high.

I'll let the experts handle the VBA for the cell size formatting as that I have to get back & earn some money for the boss.

BobUser generated imageUser generated image
I have a WPF version... requires .NET 3.5 installed to run.

Please note: there are some issues with where labels show up, and how clicking works.... yes, something happens if you click on a hex.

Now, how do I get it uploaded, since xaml isn't on the list of approved file types?
Good luck with that. Getting files uploaded is harder than trying to get on a plane with a Glock. Then again, you could just change the extension...but then that would be way too easy...

You listening Jonathan?
I actually changed the extension already

Someone there is too smart for that -- they're reading the file header, not the extension.

It sort of sucks that I have a solution that I can't upload -- nor will code files for WPF or Silverlight be able to be uploaded *anywhere* on the site. Also, any other source code files... vb, cs, java, jar files are all out of luck.
Have you tried changing the file extension, then zipping the result? That's the trick we need to use for Excel 2007 files.
gah!

I was hoping to put the whole solution up... that's gonna be a mess of files...

oh well.... here it is.... just remove .txt from the end of every file.... .exe coming soon
Hexagons.zip
Here's the exe... same deal
Hexagons.exe.zip
Are there any instructions for where to put the files? I am getting an error message: "WpfApplication1 has encountered a problem and needs to close."

Brad
Brad -- do you have .NET 3.5 installed? I don't think there were any DLL files to distribute. I'm new to WPF, so haven't done a deployment on it yet.
Jeff,
I thought I had .NET 3.5 installed, but was obviously mistaken. After downloading and installing it (about 75 minutes by the way), your Hexagon.exe now loads and allows me to turn hex cells red by clicking on a neighbor.
http://www.microsoft.com/downloads/details.aspx?FamilyId=333325FD-AE52-4E35-B531-508D977D32A6&displaylang=en

Thanks!

Brad
yeah... that's the issue with clicking I referred to.... for some reason, it seems like the clicking only works if you click on the actual lines when the hex isn't selected
Okay.. that issue is fixed -- I've changed the fill to WhiteSmoke instead of nothing.

Now I just need to fix the labels.

Next step... highlighting all cells within a distance of the clicked cell.
SOLUTION
Avatar of Jeff Certain
Jeff Certain
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
TelMaco,
In case you haven't realized it, you'll get much more value out of a question when you participate in the discussion. Most experts enjoy the interaction with the Asker (and other experts). If you don't understand something, ask the expert for an explanation. If we are headed in the wrong direction, please tell us more about your constraints.

You will also find that the more precisely you ask your question, the more appropriate the response will be. You provided little direction in this thread, so there are a variety of approaches on offer. We don't know the name or rules of your game, and so are guessing which features you might want to implement.

Brad
Yes, at the risk of busting the party up and catching a few tomatoes, the majority of the Experts, Moderators, and Administrators involved the first day were sitting around the hotel lobby looking for some trouble. Normally we would have headed into the parking lot and fired potato cannons or harassed the pickup truck convention rednecks. But you posted your question in time to prevent that and so we directed our collective energy at your question - for good or bad.

At this point most of the original "A-Team" have returned to their home countries and are working through neglected "honey do" lists. There is no "B-Team" unless you want to consider the Experts who did not chose to attend the conference...but they're losers anyway.

So, here we are, building and testing a .net solution with "pulled out of our ass" rules. Rumor has it that RQuadling is working on a PHP solution but, quite frankly, I doubt even he can get PHP to do some of the magic already demonstrated.

Needless to say, my guess is that you simply want to have some fun in VBA using Excel as an interface. If so I suggest posting something soon as you still have the attention of some of the best Excel guys on the planet and this thread is not yet dead.

Kevin
Avatar of TelMaco

ASKER

Thanks guys! It's been fun watching this develop.  I apologize if I should have provided more direction, but you seemed to be having so much fun.  Let's see if we can get this back on track, because I think we've gotten off on a tangent.  Chaosian...looks cool, butI don't know where you're going with that....

I had planned to build the "rules" into Excel using logic formuals, and some VBA.  Really all I needed was a spreadsheet where the "cells" looked like hexagons.  And where the cells would act the same as Excel cells.  Meaning I could enter formuals, add conditional formatting, and reference them easily in VBA.

As I said earlier...I think the best approch was a combination of the "brick' idea overlayed by actual pictures of see-through hexagons.

This merging of cells to make the bricks, overlayed with the picture of a hexagon, would allow me to use actual excel cells that mearly look like hexagons.  Really, that's good enough.

See the example I provided above

Again, as I stated above, I can draw the hex's manually, but making the cells the right shape, and centering the hexes overtop was a pain to do manually, plus any small error over a large template would not line up correctly.

I asked if it was possible to use VBA to format and merge the cells, make them the right size, and then use VBA to center a hex overtop of each merged cell.

lynx20 seemed to understand what I was saying, but he did not actually provide anything functional.

Byundt and Zorvek were on the right track, we just need to combine what they did.  I stated that I did not understand where this was going in regards to the hexes moving around, or changing colors..but again, you all were having fun experimenting.

I don't want to tell you how to solve this,  as it seems there are many ways to do it.

At the risk of sounding brash, here what I WANT you to do
Using VBA:

Create an Excel Template that is x wide by y long - I want to be able to change this in the VBA code
In this template I want cells merged as in the above "Brick" example
Then I want hexagons centered overtop of each merched cell

I would like to be able to modify the size both of the template, and the size of the cells, and their overlying hexs easliy in VBA.

I hope this puts us back on track.

Thanks everyone for their contributions!


Well... it's hexagons, and easy enough to select one to do things like finding neighbors, etc.

Your logic could be built in to the VB file.

You can change the size/number of the cells easily enough through the properties of the HexagonArray control in the Window1.xaml designer.
I think this is a first. We have asked the Asker to make this into a real project for us. Usually it's the other way around!

Note the confidence he is now showing having concluded that we are able and willing: "At the risk of sounding brash, here [is] what I WANT you to do Using VBA".

Not complaining - just observing.

Kevin
@TelMaco,
You have I think achieved a first - getting Kevin to bring a subject back on topic. Anything beyond that has to be a bonus...
Kevin,

Funny... I thought I was the only one treating this as a real project. :)

If nothing else, this has provided a good excuse to play with WPF.

Jeff
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I agree. You can run the whole show strictly from drawing objects and some classes. Cells are just containers for a value and you can use the drawing object for that.

Jeff - During the four ride from SLO to SFO, Richard kept going in and out of plotting a PHP implementation. Having seen nothing posted he either got roped into chores by the SO or is still struggling with PHP. And then there is Brad and me.

Kevin
<poking the bear>I'm not sure I consider dancing hexagons as a "serious" attempt to implement a game-oriented solution.</poking>

I had hoped that the transition from VBA to VB.NET would be relatively painless, and would encourage moving to a more... robust implementation. WPF is intended to do really amazing things with graphics easily, so I thought it might be a better long-term solution than Excel/VBA.

It would be interesting to see the solution Richard comes up with though.

Jeff
>>my guess is that you simply want to have some fun in VBA using Excel as an interface.

Yeah, my thoughts also. It's always fun to be a little "creative" with Excel VBA. Like the Xmas Tree challenge -> http:/Q_21672197.html

Wayne
Richard?

OK, I'll take myself out of the "actively working on the project" club for the moment...but that status can change any minute ;-) I too have a honey, a honey do list, and a real job or three.
Avatar of TelMaco

ASKER

"you would find it impossible to click on the cell to select it. If you tried, you would be clicking on the hexagon instead."

Dang-it, yup I did't think of that. Hmmm...I'll need to think about where to go from here.

I've got a ton of "real" work to do though. I'm not gonna be able to focus on this for a couple of days. I'll try to keep my eye on what's going on here though.

BTW if any of you are any good with MS Access, I've got a post up
<http://www.experts-exchange.com/Programming/Languages/SQL_Syntax/Q_23660091.html >

lol, the sooner I do my job, the sooner I can play (=


"Rumor has it that RQuadling is working on a PHP solution but, quite frankly, I doubt even he can get PHP to do some of the magic already demonstrated."

<lazy grin>PHP is server side so you wouldn't see it anyway.</lazy grin> (hmm, do you know I managed to get out of it yet?)

"Richard?"

I'm back at work and they've moved my desk AGAIN!!!! I think it's on wheels and soon I'll be working in the car park. I'm sure they're telling me something.

And the "honey" list I've got includes preparing for the new baby (arriving sometime at the beginning of October), so I'm really not going to be active for a while.

OK boys and girls, time to get serious...

Attached is a workbook with a framework installed to build games using the hexagonal shape as a building block. It's primitive but works to the point of demonstrating how to use classes to manage the playing field. I have implemented two games: a test and Life.

The test highlights a cell's neighbors and then either the border cells or the interior cells depending on what cell was clicked. To tun the test, run the macro InitializeTest and then click on cells.

Life is a variation of the classic Life simulation which is usually implemented with squares. The game is started by setting the cells that are alive on and then starting the simulation. Each simulation cycle evaluates all of the cells on the grid and creates a life if it has two live neighbors or kills it if it does not. To run the Life sample, run the macro RunLifeSample1. To stop the simulation press CTRL or ALT. To run your own Life simulation, run the macro InitializeLife, click cells to create live cells, and run the macro RunLife to start the simulation. The simulation will run until you press CTRL or ALT or there are no live cells.

The game area is flexible in terms of number of rows, number of columns, and size of the cells.

Kevin
Q-23654024V3.xls
Kevin,

As soon as I click a cell, I get an error that GameFieldCell isn't found.

Public Sub LifeGameFieldClick()

    With mGameField.GameFieldCell(Application.Caller)
        If .Color <> mxlSchemeColorRed Then
            .Color = mxlSchemeColorRed
        Else
            .ClearColor
        End If
    End With
   
End Sub
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Looks good, Kevin.

A little slow, but I'm assuming you've got a delay built in and I'm just impatient ;)
You guys get a big thumbs up.

Too bad I can't give you all nice canvas jackets with extra-long sleeves. ;-)
Avatar of TelMaco

ASKER

SWEEET this looks cool!

I am swamped at work so I can't really test it out until the weekend.  I'll let you know what I think soon.

Thanks
Gee. So there we were, busting our brains, trying to get you THE answer of all time and what happens?

Abandonment.

I feel bereft.

But on the plus side, I got ZAPE privs and a new baby next month. So, thinks are looking up!

Now, if I can just work out how to get ALL the points to myself with my new found powers, erm, responsibilities, ...
Well, without me, nobody of you all would have come to this question ...
all points to me (for the vb solution :)





just kidding :)
RQuad,

Congrats on the new baby!  Boy or girl?
Mr. Eyes,

You have no solution...you're just a troublemaker looking for trouble...

Mr. Z
J, I'll let you know next month!
TelMaco,  it looks like the experts are getting restless!

Best post either a progress report or divide up some points amongst them for their undoubted efforts at reshaping things for you :)
Now I deserve at least a few points for the WPF implementation in a language that will be more robust :)
Avatar of TelMaco

ASKER

Hey, I don't mean to leave you hanging.  I can't get away from work, which leaves no time for this fun stuff.  I don't even know where to start with points, this post turned rediculous.

You guys have given me so much more to think about, suffice it to say I'll be playing with your suggestions for quite some time.  I think that I will be awarding main points to Chaosain and Zorvek.  I know that there were a couple Mods involved here, and may have a better idea than I as to who was putting in work vs who was just posting...   (=  

Mods, please fell free to adjust my distribution of points as you see fit.

Thank you all for runnning with this, it was quite enjoyable to see you in action.
BTW I am quite new to the site, but look forward to learning more from you.

Thanks everyone!
Stephen
Avatar of TelMaco

ASKER

I said "A" and "Yes" for everything, despite not quite understanding all of what you provided it has given me a wealth of ideas and code to explore.  You guys are an inspiration, thanks for making this fun!  BTW, I hope you feel the points are fair, I'd love to give everyone 500 points...You've my support if any of the Mods will give out extra points on this one (=
Stephen,

We enjoyed it tremendously ourselves. Glad we could help.

Jeff
>this post turned rediculous

Hey! I resemble that remark!

Actually, it did turn ridiculous. So here's the story if you haven't figured it out already.

Experts Exchange was having it's annual conference where they invite the Admins, Mods, Zone Advisors, and some top Experts to headquarters in San Luis Obispo, CA. It was Saturday morning and the main event was over. A few of us more nerdy folks were sitting on our butts talking about cool tools for Experts and what the next hot technology will be when you posted what appeared to be a silly question: "What software do I need to create a spreadsheet with hexagonal or octagonal cells?" You have to admit that, on the surface, that's a pretty ridiculous question :-)

AngelIII, the nerdiest nerd of the nerds who monitors every damn zone on Experts Exchange and has more points than anyone noticed it first - as usual - and pointed it out to me and a couple of other Excel guys. Our first reaction was "Oh, goody! Something silly and fun!" And then we ran with it. Pictures were taken and more Experts joined the fun. For that first day most of the posts were made by Experts and Mods who were actually sitting at or near that table in the lobby of the hotel.

At some point the silly question started to look like a real question and a few of us actually tried to help. I drove three of the Experts from San Luis Obispo to San Francisco the next day and your question was the topic of at least one discussion. RQuadling kept drifting off and mumbling about solving the problem with PHP.

The bottom line is you witnessed a unique and very rare occurrence that all of us will remember fondly. Your question was touched by a good number of the best Experts from around the world who had all just met each other in person a few days earlier. The only bad part is most of them really had no idea what they were doing!

Kevin
I agree, never had so much fun (on a EE question) !!!

<kidding>
Kevin, just for the record:
IMHO, the first one turning this q really into "fun" was you with #22245568
while, with my comment #22245866 I tried to come back to "serious" (somehow) ...
also, if I was really the nerdiest nerd of the nerds .... how comes I did not work for days on this "damn" little excel files & co stuff ...
and that you did score here while I did not? :)

next time I won't tell you, and have my fun alone 8-)
</kidding>

Have fun, all!
Kevin,

Hopefully, not so rare in the future. Perhaps we should get EE to block out a time slot for "collaborative answers" at the next conference?

Jeff
PS: I forgot:
good work!  for those that did work "seriously" on this question !
CU
>how comes I did not work for days on this "damn" little excel files

Because you were busy keeping Askers happy in the other 999 zones! Only the nerdiest nerd of all nerds would monitor every freaking zone on the site ;-)

Jeff, we have to keep in mind the uniqueness of this situation: a silly question by most standards (hexagonal cells?) asked on a Saturday morning when a bunch of top Experts are sitting at the same table in a hotel lobby in podunkville with nothing else to do...it was magic that can't be manufactured.

The previous silly Excel question was this one: http://www.experts-exchange.com/Q_21407772.html. They don't happen often.

Kevin
For the record, I found this Question from Kevin's EE profile page.  It is, by far, the BEST Question I have ever read on this forum.  Thank you all for brightening my day.

Cheers,

Justin
I'm _STILL_ working on a PHP solution, if anyone is interested ...
Talking (well muttering) in your sleep is a wonderful method of winding up sleeping partners!

Just spent at least 15 minutes glancing at the rough idea of this thread, Am thinking I need to get to a convention...
Really? Might forgetting you ever saw this thread or heard of the so-called convention be a better path to a sane and productive life?
Sanity? Lost that years ago....
EPIC THREAD IS EPIC!
In case you'd like to draw a hexagon in SQL Server, here's one I built over a year ago: http://blog.hoegaerden.be/2010/02/26/drawing-in-sql-server-2008/

I actually ended up using it as my site icon ;-)

(ended up here through https://www.experts-exchange.com/blogs/EE-Team/B_5374-Where-in-the-World-is-EE-Contest.html)

I know the world has moved on and things change, but, guys, I really really think I'm at least 1% completed on a PHP solution!

I love you...but I'm not sharing the points.