+ Post New Thread
Results 1 to 5 of 5
General Chat Thread, What are the chances? in General; I'm just using the data import preparation sheet from kerboodle! and had a quick look at the VBA code behind ...
  1. #1

    LosOjos's Avatar
    Join Date
    Dec 2009
    Location
    West Midlands
    Posts
    5,771
    Thank Post
    1,511
    Thanked 1,294 Times in 884 Posts
    Rep Power
    813

    What are the chances?

    I'm just using the data import preparation sheet from kerboodle! and had a quick look at the VBA code behind it (I do this as a matter of course in case I see anything interesting, sad I know...) and lo and behold a function called LegalFilename()

    Nothing special about that and nothing out of the ordinary, apart from the fact the code matches the code for the version of this function I wrote, letter for letter, even down to the variable names!

    My version:
    Code:
    Public Function LegalFilename(fName As String, replacement As String) As String
    Dim IllegalCharacters As String
    IllegalCharacters = "?[]/\=+<>:;"",*"
    LegalFilename = fName
    For x = 1 To Len(IllegalCharacters)
        LegalFilename = Replace(LegalFilename, Mid$(IllegalCharacters, x, 1), replacement)
    Next x
    End Function
    kerboodle! version:
    Code:
    Public Function LegalFilename(fName As String, replacement As String) As String
    Dim IllegalCharacters As String
    IllegalCharacters = "?[]/\=+<>:;"",*"
    LegalFilename = fName
    For x = 1 To Len(IllegalCharacters)
        LegalFilename = Replace(LegalFilename, Mid$(IllegalCharacters, x, 1), replacement)
    Next x
    End Function
    What are the chances of that?!

    EDIT:
    Wow, I really wish I hadn't posted that, I weren't looking at the code for kerboodle! sheet at all, I was looking at another module within my own code... I knew I should have stayed in bed this morning...
    Last edited by LosOjos; 19th January 2010 at 01:01 PM.

  2. #2

    Join Date
    Jul 2006
    Location
    London
    Posts
    2,963
    Thank Post
    160
    Thanked 153 Times in 117 Posts
    Rep Power
    50
    LOL

  3. #3

    korifugi's Avatar
    Join Date
    May 2008
    Location
    Derby
    Posts
    1,085
    Thank Post
    247
    Thanked 337 Times in 190 Posts
    Rep Power
    189
    Shock! Horror! Own code matches own code!

    Have a biiiiig mug of <insert choice of non-alcoholic beverage here>, and I'm sure you'll be alright!

  4. #4

    LosOjos's Avatar
    Join Date
    Dec 2009
    Location
    West Midlands
    Posts
    5,771
    Thank Post
    1,511
    Thanked 1,294 Times in 884 Posts
    Rep Power
    813
    Quote Originally Posted by korifugi View Post
    Have a biiiiig mug of <insert choice of non-alcoholic beverage here>, and I'm sure you'll be alright!
    I'm taking that as medical advice, I'll be sure to indulge at the John Mayer gig tonight!

  5. #5
    gibbo_ap's Avatar
    Join Date
    Nov 2007
    Location
    Staffs, UK
    Posts
    937
    Thank Post
    233
    Thanked 81 Times in 64 Posts
    Rep Power
    37
    Quote Originally Posted by korifugi View Post
    Shock! Horror! Own code matches own code!

    Have a biiiiig mug of <insert choice of non-alcoholic beverage here>, and I'm sure you'll be alright!
    at present i cud do with an alcoholic beverage - namely a hot toddy - darn cold! *runs for another tisue*

    edit: sneeze!



SHARE:
+ Post New Thread

Similar Threads

  1. Fancy your chances?
    By tech_guy in forum General Chat
    Replies: 2
    Last Post: 16th October 2008, 12:20 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •