Feeds:
Posts
Comments

Using A Counter In A VBA Macro

T'other day, I knocked together a macro, for a friend, to number the paragraphs in a Microsoft Word document ("manual" rather than hard-coded numbering, that is):

Sub NumberingParagraphs()

    Dim iParagraphs As Integer
    iParagraphs = ActiveDocument.Paragraphs.Count
    
    Selection.HomeKey unit:=wdStory
     
    Do While iCount < iParagraphs
        iCount = iCount + 1
        Selection.TypeText iCount & ": "
        Selection.MoveDown unit:=wdParagraph
    Loop

End Sub

My mate, being curious about, but not having experience of, the workings of such things, took a look and got the basic idea, but couldn't get his head around why the number of loops is seemingly instructed to be one less than the number of paragraphs. Surely, he said, it should be "less than or equal to," rather than "less than." Well, no. His kid got it straight away, and came up with a lovely semi-analogy; which I now share, in hopes that others who've been puzzled by this oft-seen seeming-paradox might see the light. Let's literally (yet figuratively) walk through the macro…

Continue Reading »

Oh Bollocks

Neither the EU nor immigrants are forcing poor British families into ever-deeper poverty. Our Tory government is doing that.

Neither the EU nor immigrants are bleeding the NHS dry, closing libraries, trying to sell our school system to the highest bidder, and generally stomping on the faces of anyone too poor and powerless to kick up an embarrassing fuss. Our Tory government is.

And you, you stupid fuckers, regardless of any other outcomes of what has to be the dumbest decision I've had the doubtful privilege of witnessing—and there will be many outcomes, and they will be dire—have just handed our government to the most reactionary, right-wing section of the Tory party, who care even less for people less fortunate than themselves than do the smug, rich, self-serving bastards who currently hold the reins.

*Slow clap*
Daz


You may use these HTML tags in comments
<a href="" title=""></a> <abbr title=""></abbr>
<acronym title=""></acronym> <blockquote></blockquote> <del></del>* <strike></strike>† <em></em>* <i></i>† <strong></strong>* <b></b>†

* is generally preferred over †

The Christian Right On Orlando

Please accept our love and prayers.
Such violence, we do reject—
But please don't fly your rainbow flag;
It makes us think of yucky sex.
And please don't kiss out in the street,
Don't let us see you holding hands,
Don't make us see that you exist,
Don't ask for rights or wedding bands.
For though you've suffered awful loss,
We sympathise, but must defend
Our right to keep you in your place
As not-quite members of the human race;
As second class citizens.

The curd of human kindness
Splatters from our bowels.
We label it "Condolences,"
And heap it on with trowels.

Daz


You may use these HTML tags in comments
<a href="" title=""></a> <abbr title=""></abbr>
<acronym title=""></acronym> <blockquote></blockquote> <del></del>* <strike></strike>† <em></em>* <i></i>† <strong></strong>* <b></b>†

* is generally preferred over †

As it's Friday and I'm actually at the computer, hows about a Friday Night Is Music night post? This week's theme is the colour red. I've gone the literal route—every song I'm posting above the line has the word "red" in the title—but if you're adding suggestions in comments, feel free to widen the concept to things that are red; sunsets, bloodstains, etc. Anyways, here's six from me to start the ball rolling. A red ball, obviously.
Daz

Continue Reading »

Toggle Wikipedia Mobile & Desktop Versions

So whadapp'ndwas, someone cited Wikipedia's article on the Qur'an, but instead of posting that link to the regular desktop version, they posted the mobile version instead. And I have to say, even on my desktop I prefer the cleaner, uncluttered mobile Wikipedia to the regular version. So much so, in fact, that I spent a fruitless half-hour trying to find a script or add-on which would allow me to always be directed to the mobile version. The closest I got was finding an old toggle-between-the-two one for Chrome which, according to the comments on the page, no longer works.

Bugger!

Continue Reading »

Since I'm now an over-fifty, I'm officially old enough to make posts about how youngsters these days don't know how lucky they are, compared to the days of my yoof, when we had to make our own entertainment out of clods of earth, pocket-fluff and string (the hairy Post Office kind). And since I was wittering on, a while back, about it being a good thing that vinyl makes cherry-picking of favourite tracks more difficult, let's consider what we did when we did want to have a bunch of favourites play one after the other.

These days, of course, creating a playlist is easy. Drag 'n' drop as many files as you want into your preferred music playing program, re-order to taste, and Bob's yer aunty's significant other; one playlist, created in seconds or minutes. And if you like the list enough, you can save it as a playlist file (.m3u or whatever), and have your very own compilation album, available for your listening pleasure at a couple of mouse-clicks. And there's no limit on the duration of the thing, either. (Billy music player* informs me that a playlist consisting of all of the contents of my main music folder, for instance, is three weeks, five days, twelve hours, forty-seven minutes and twenty-nine seconds long.)

Continue Reading »

The Wisdom Of The Ancients

This thing you do was then a crime
So we must ban it from our land.
Uncountenanced in olden times
It surely springs from a Satanic hand.

Nothing novel, nothing new!
Progress? Folly! How can you
On ancient thoughts seek to improve?
You should be to Hell-fires thrown
For questioning what's set in stone,
For daring to erode those chiselled grooves.

On ancient writ our laws are based ;
We'll abide with nothing that is new.
Their prejudice should rule our taste;
As once was done, so we should ever do.

Daz


You may use these HTML tags in comments
<a href="" title=""></a> <abbr title=""></abbr>
<acronym title=""></acronym> <blockquote></blockquote> <del></del>* <strike></strike>† <em></em>* <i></i>† <strong></strong>* <b></b>†

* is generally preferred over †

Follow

Get every new post delivered to your Inbox.

Join 489 other followers