Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - hazzacanary

Pages: [1] 2 3
General Gaming - The Arcade / Re: Haven and Hearth - Exilian's Colony
« on: March 27, 2012, 10:15:58 AM »
I haven't played H&H before, but it looks good. SUmmer maybe, when we all have less to do?

jubal - doen't this need updating soon? you could add your upcoming text-based rpg...



PART 1 - INTRODUCTION - layout, cell references

what is excel vba?

It is a version of microsoft's vb (visual basic) programming language, embedded into every install of microsft excel.
The acronym vba stands for visual basic for applications, and it is inculded with every office program.

why is it useful?

It can be very good for automating certain more menial procedures, or offering more powerful functions than can be found in the
forumla bar. It is also fairly accessible in a workplace or public institution (school, university) as almost
everyone uses microsoft office!


It isn't very useful outside of excel!


lets start with the usual hellow world application. Through doing this, we'll learn some of the crucial basic
elements of excel programming. Anyways, on with the programming.

To get to the vba window in excel, either go to tools->macros->visual basic (office 2003 or older) or go to developer ->visual basic (office 2007 or newer)
then we want to click insert-> module

Ok, on with the code. we're going to create a hello world application that prints the words "hello world" into cell A1/R1C1 on our worksheet. It goes something like


Code: [Select]

sub helloworld()

cells(1, 1).value = "hello world!"

end sub

ok, there a few things to notice there. We'll start with the first line:

Code: [Select]

sub helloworld()

Notice how it started with sub? every procedure in excel vba has to start with either "sub" or "function", depending on what it will be used for (functions are for

calculations, sub for processes). These "subs" or "functions" can also be "public" or "private" or on their own, although I can't recall why at this moment in time! We

also have to name the sub in this line (we called it "helloworld" here). now for the second line:

Code: [Select]

cells(1, 1).value = "hello world!"

there's a lot to learn from this line. The first part is one of the two ways you can refer to cells in vba; a cells(i, j) reference, or a range() reference. I use cell

references most of the time, although both types have their ups and downs. ok, the next part:

Code: [Select]
.value =

This is merely what you're "doing" to the object you selected before it. Here, we selected a cell, and with the ".value" command, we're telling it what its value will

be. However, like many commands in any language, you can't use ".value" with out an = after it (and something for it to actually be equal to!)

Code: [Select]
"hello world!"

Like many other languages, any raw-data must be enclosed in quotation marks. I think either " or ' is fine.

Code: [Select]
end sub

This final command goes hand in hand with the starting command. In excel vba, you have to finish what you started. This means that you have to end every code with

either "end sub" or "end function", depending on what you started with. Like with the start, these subs/functions can also be "public" or "private" or simply on their

Well that's it for the first vba tutorial. I don't know when I'll get around to doing part 2, but keep pestering me and I'm sure it will be done eventually. If you

have any requests for part 2, please dont hesitate to post them here. Anyways, thanks for reading, I'll see you around!

Adventures of Soros / Re: ADVENTURES OF SOROS
« on: March 15, 2012, 09:50:30 PM »
Anyone got good quest ideas?

You must have done the classic "rescue someone" quest, or "fight evil bad-thing and save world" quest. Do you have a main questline?

Bethesda Mods / Re: The Hordelands Of Morrowind
« on: March 12, 2012, 01:18:45 AM »
Looks pretty serious stuff; how much does Morrowind cost these days? I miiiight think about getting it...

It's really old (from 2001 I think), so look around on ebay and at CEX/GAME/GAMESTATION etc and you should able to pick it up fairly cheap (£10?)

Looks good! As much as I would would love to help, I've never modded before so I don't think I would be of much use...

Computer Game Development - The Indie Alley / Re: Android game?
« on: June 28, 2011, 08:59:59 PM »
well yes if you hekp, but 3d will probably be beyond my abilities, and most cheap android phones as they dont have a gpu

Computer Game Development - The Indie Alley / Android game?
« on: June 27, 2011, 10:22:22 PM »
After the summer, when I've learned some more javascript, does anyone want to try and create a game to run on android phones? I will probably still be rubbish at scripting then, so something simple like pong is probably a good idea...

Non-game Programs - The Tinkers' Workshop / Re: android app
« on: June 27, 2011, 06:44:33 PM »
sorry I meant to say Decide on the featurelist and get a storyboard made and GUI designed

Non-game Programs - The Tinkers' Workshop / Re: android app
« on: June 27, 2011, 06:36:42 PM »
i think the first objective would be to get it to display a mobile versionof the forums

Questions and Suggestions - The High Court / Re: Exilian Games 2011?
« on: June 27, 2011, 06:10:19 PM »
well can we start a threadc organising the teams then. I'm afraid I've lost my RTW disc, so until I have a search, count me out

General Gaming - The Arcade / Re: Haven and Hearth - Exilian's Colony
« on: June 27, 2011, 01:54:52 PM »
i'd be up for starting in this thing, whatever it is. I'm about to register - what do I need to do to join the colony?

And I can't help myself - the wall-building mechanic is TERRIBLE!

just tested 0 A.D, and its looking good. Ihavea lot of suggestions, but ill restrict myself to just jubot concerned ones. Firstly, can you make the jubot have a strategy for attacking buildings; rather than just attacking the nearest one blindly, it might aim to destroy defences first, or resource gatheres or unit production - it wpuld be your choice. Also, can you make the JuBot send out scout units, so it knows where the enemy buildings are, so it doesnt stand around gawping when it has destroyed your walls and cant see anything else.

Questions and Suggestions - The High Court / Re: Exilian Games 2011?
« on: June 27, 2011, 12:38:04 PM »
AoE 1 or 2?

Pages: [1] 2 3