REALbasic Offer

realbasic logo

REALbasic recently offered a free license to VB6 users. I got my license a couple of weeks ago, but haven’t dove into REALbasic yet. I’ve heard good things about the software, and I’m kind of anxious to give it a whirl.

REALbasic sent me an email today saying they are extending their free offer until April 15, 2005. You can take advantage of the

Free Offer For Visual Basic Users

This link is unique to me and I win a prize if I get a lot of people to sign up. I’m not really interested in a prize, I just wanted to get the word out about this VB6 alternative (but I won’t be turning it down, either.)

From Geoff Perlman, Founder and CEO of REAL Software, Inc.

Since we started giving away REALbasic keys to Visual Basic users two weeks ago, more than 10,000 new Windows developers like you have joined the REALbasic community. Unlike Visual Basic, REALbasic is fully supported and we will continue to improve it constantly based on feedback from you, our new users.

Giving away licenses to VB6’ers seems like a brilliant scheme to me. Time will tell, but 10,000 downloads is a pretty good start, I’ll bet.

P.S. I stole this picture from their website. Can I do that?

Daily Dose By a Nose

It looks like Daily Dose of Excel is, and always will be, the name of this site. I’m glad you like it. Of the others, my favorite was The Excel Chronicles, but Overdose was a close second.

In a sense, we’re all winners. But in a more real sense, Bill is the winner because his suggestion, Excel Overdose, had the most votes. Bill, an email is being sent to you by our crack team of contest administrators. Or is that our team of contest administrators on crack? I’m not sure. You get your choice of Professional Excel Development or Excel VBA Programming for Dummies shipped straight to your door.

Congratulations, Bill. Thanks to everyone who participated.

The Vote

Based on the comments and emails, I think I know how this one’s going to turn out. Should Daily Dose win, the second place finisher will win the prize. Voting starts when you can see this post and ends promptly at 8:00PM CDT (GMT -5, I believe. But don’t quote me on that.)

Don’t feel bad if your submission didn’t make the list. Some were just too lame, some nearly obscene, and others were from unregistered readers. Rules are rules, even if they’re stupid rules. Thanks to everyone who submitted.

I should also mention that some of the submissions were anagrams (more than one, actually), and while none of them made the list, that would have been a far more interesting contest. I didn’t publish those submission so you could use them for the second anniversary contest.

Daily Dose of Excel should change its name to:
Excelog
The Excel Chronicles
Excel-a-gram
Excelsior
Excel Overdose
The Excelerator
Excel Vitamins
XLerate
Daily Dose of Excel


  

Free polls from Pollhost.com

A New Daily Dose Look

Earlier today I was setting up a new WordPress installation. I didn’t realize it at the time that I upgraded, but version 1.5 is quite a bit different than the old version. I don’t know if it’s better or worse, but it seemed a lot easier to control, primarily because there are so many different php files in the theme folder. My current theme only has three php files. I assume that’s because it’s a legacy from the old way of doing things.

It’s time, I’ve determined, to start over from scratch and actually learn some CSS. That means you may see some strange happenings in the way of formatting over the next week. If you see something you like or don’t like, you can comment here or drop me an email.

Fog Creek Software

I read Joel on Software and via links from that blog I’ve been enjoying a series of articles about FogBugz. I found them interesting and well written. You may too. After reading Part V, I was searching around for a link to Part I for this post and came upon the archives page.

On that page, I saw a few other articles I might like to read, including User Interface Design for Programmers, Painless Functional Specifications, and others.

And here’s a couple of other links I got from Joel’s site that I want to read: Coder to Developer and Larkware. Once again, DDoE becomes my personal link storage facility.

Spellchecking One Cell

When you apply the CheckSpelling method to a one-cell range, Excel continues to check the rest of the sheet and prompts you to continue spellchecking from the beginning of the sheet. You can use Application.DisplayAlerts = False to remove the prompt, but it still checks more than just that cell.

Excel range with two misspelled words

Sub CheckSpell()
    ‘Checking one cell will result in a prompt
   Range(“C3”).CheckSpelling
End Sub

message box to spellcheck from beginning

Tom Ogilvy noted in a recent newsgroup post that extending the range to more than one cell solves both problems.

Sub CheckNoMsg()
    ‘this eliminates the prompt, but still checks D4
   Application.DisplayAlerts = False
    Range(“C3”).CheckSpelling
    Application.DisplayAlerts = True
   
    ‘This checks c3 only – kind of
   Union(Range(“c3”), Range(“iv65536”)).CheckSpelling
End Sub

Combining, via Union, the range in question with a cell that we know to be empty (IV65536 in this case) limits the spellcheck to one cell – actually two, but who’s counting.

Changing the System Cursor

I was thinking about implementing a “What’s This?” type help system on an Excel userform. The first task, it seems, is changing the cursor. In Changing the Cursor in VBA, I discussed the built-in way to modify the cursor. The options there are pretty limited and they particularly don’t include a question mark that I might like to use for this application.

AllAPI.net had an example from Jerry Grant that seemed to fill the bill. It uses several API’s of which I understand most. I modified the example a little to suit the situation. Here is the declaration section of a standard module:

Option Explicit
 
Public Declare Function CopyIcon Lib “user32” _
   (ByVal hIcon As Long) As Long
 
Public Declare Function LoadCursorFromFile Lib “user32” Alias “LoadCursorFromFileA” _
    (ByVal lpFileName As String) As Long
 
Public Declare Function SetCursor Lib “user32” _
    (ByVal hCursor As Long) As Long
 
Public Declare Function SetSystemCursor Lib “user32” _
    (ByVal hcur As Long, ByVal id As Long) As Long
 
Public Declare Function GetCursor Lib “user32” () As Long
 
Public Const lOCR_NORMAL As Long = 32512

And here is the code behind the userform that changes the cursor.

Private mbWhatActive As Boolean
Private mlCurrCursor As Long
Private mlDefCursor As Long

Private Sub cmdWhat_Click()

    If mbWhatActive Then
        ChangeCursor
        mbWhatActive = False
    Else
        ChangeCursor “C:Windowscursorshelp_r.cur”
        mbWhatActive = True
    End If
   
End Sub

Private Sub ChangeCursor(Optional sCursPath As String)
   
    Dim lCursor As Long
   
    If Len(sCursPath) = 0 Then
        lCursor = mlDefCursor
    Else
        mlCurrCursor = GetCursor()
        mlDefCursor = CopyIcon(mlCurrCursor)
        lCursor = LoadCursorFromFile(sCursPath)
    End If
   
    SetSystemCursor lCursor, lOCR_NORMAL
   
End Sub

I was messing around with cursors, and I think I like this one the best:

userform showing changed cursor

Setting MultiSelect in Code

Jason points out a problem with setting the Multiselect property of a Listbox using VBA, as opposed to setting it manually at design time. Take this code:

Private Sub UserForm_Initialize()
 
    Dim sht As Worksheet
   
    Me.lstSheets.MultiSelect = 2
   
    For Each sht In ActiveWorkbook.Worksheets
       Me.lstSheets.AddItem sht.Name
    Next sht
 
End Sub

It produces this userform with unsightly rectangles around each list entry.

Listbox with rectangles around all entries

This happens with MultiSelect = 1 or 2, but not zero. If you must change this property in code (and Jason does, but I’ve simplified his situation for this example), do it after you populate the control.

Private Sub UserForm_Initialize()
 
    Dim sht As Worksheet
   
    For Each sht In ActiveWorkbook.Worksheets
       Me.lstSheets.AddItem sht.Name
    Next sht
   
    Me.lstSheets.MultiSelect = 2
   
End Sub

Listbox with rectangle around first entry only

Good question, Jason. I rarely set that property at run time, but if I do, I can’t have my Listboxes all rectangly.