Shandy's Blog

Where Andrew Sutton, aka Shandy rants and rambles on as the fancy takes him

vbCity Blogs moved to:
http://cs.vbcity.com/blogs
  Home :: Syndication  :: Login

My name is Andrew Sutton, aka Shandy.

I am currently living and working in the UK as a software developer. This blog contains mainly IT related issues.

I was a Microsoft VB MVP for a couple of years (Apr 2004-Mar 2006) and was a vbCityLeader between April 2003 and June 2007.

If you are looking for my Sri Lanka or Morocco experiences check out Shandy's Sri Lanka Blog or Shandy's Morocco Blog. My personal (Non IT) blog is now at Shandy's Place

JunJuly 2005Aug
SMTWTFS
262728293012
3456789
10111213141516
17181920212223
24252627282930
31123456

Articles

Archives

Topics

Image Galleries

.NET

Blogs I Read

Others

VB.Classic

Tuesday, July 19, 2005 #

I released my first ever code to the vbCity Code Bank - VB.Classic this week; Update File Creation/Last Modified/Last Accessed Dates. I created this code to solve a small problem I was having at work where I was losing file creation and last modified dates on files. Basically I needed the user's creation and last modified file dates to be used, even if I modified or even re-created some files afterwards. The code I wrote worked quite nicely in that it allowed me to update a file creation or last modified date (which is not available intrinisically within VB.Classic - API calls are used) and so I thought I'd finally release some of my work to the unsuspecting vbCity members ;-)
posted @ 10:02 PM

I am in the process of writing a VB.Classic application that will convert VB Code into HTML code so that it is nicely formatted. E.g.

Private Function FindNumberOfUniqueCharactersInString(ByVal strVvText As String _
                                                     , ByVal blnVvCaseSensitive As Boolean _
                                                     ) As Integer
    Dim intLvIndex As Integer
    Dim intLvCount As Integer: intLvCount = 1
    strVvText = IIf(blnVvCaseSensitive, strVvText, UCase$(strVvText))
    For intLvIndex = 2 To Len(strVvText)
        If InStr(Left(strVvText, intLvIndex - 1) _
                , Mid(strVvText, intLvIndex, 1) _
                ) = 0 Then
            intLvCount = intLvCount + 1
        End If
    Next
    FindNumberOfUniqueCharactersInString = intLvCount
End Function

becomes

Private Function FindNumberOfUniqueCharactersInString(ByVal strVvText As String _
                                                     , ByVal blnVvCaseSensitive As Boolean _
                                                     ) As Integer
    Dim intLvIndex As Integer
    Dim intLvCount As Integer: intLvCount = 1
    strVvText = IIf(blnVvCaseSensitive, strVvText, UCase$(strVvText))
    For intLvIndex = 2 To Len(strVvText)
        If InStr(Left(strVvText, intLvIndex - 1) _
                , Mid(strVvText, intLvIndex, 1) _
                ) = 0 Then
            intLvCount = intLvCount + 1
        End If
    Next
    FindNumberOfUniqueCharactersInString = intLvCount
End Function

When I have completed the application I will post it at vbCity. As you can see from the above code (created using my application) the basics are working. I just need to allow the application to know about more reserved words, perform more testing, and correct any bugs the testing shows up and then it will be ready.

posted @ 9:46 PM