My Excel 2010 Journey

I almost finally installed 2010. I say ‘almost’, because I’ve only installed it on a machine that previously had 2003 on it. I have yet to install it on my 2003/2007 machine. I guess I’ll be uninstalling 2007 and then installing 2010. Seems like a hassle, but if I tell it to upgrade, it will certainly screw something up. Anyway, here’s my first 2010 problem.

Sub OpenCSV()

Dim sFldr As String
Dim fso As Scripting.FileSystemObject
Dim fsoFile As Scripting.File
Dim fsoFldr As Scripting.Folder
Dim dtNew As Date, sNew As String

'Const sCSVTYPE As String = "Microsoft Office Excel Comma Separated Values File"
Const sCSVTYPE As String = "Microsoft Excel Comma Separated Values File"

Set fso = New Scripting.FileSystemObject

sFldr = "C:\Documents and Settings\dick\My Documents\QBExport\"

Set fsoFldr = fso.GetFolder(sFldr)

For Each fsoFile In fsoFldr.Files
If fsoFile.DateLastModified > dtNew And fsoFile.Type = sCSVTYPE Then
sNew = fsoFile.Path
dtNew = fsoFile.DateLastModified
End If
Next fsoFile

Workbooks.Open sNew

End Sub

Once I installed 2010, Windows 7 thinks CSV files are “Microsoft Excel…” rather than “Microsoft Office Excel…”. What happened to the ‘Office’ part of the name? They were really pushing that at one point. I guess it’s time I get back to Redmond.

4 thoughts on “My Excel 2010 Journey

  1. Brings back fond memories of later versions of Lotus 123, where the US default sorting collation string changed between Release 5 and Release 8 (97) and Release 9.x (Millennium), so recorded macros broke after both upgrades. Bad news if MSFT is learning tricks from Lotus 123’s death spasms.

    I really hope this Office/Excel case isn’t due to some low-level developer team member being charged with saving a few bytes here and there. Much better if they were innocently if wrongly believing they were improving Excel. That is, much better if this were done in the mistaken belief they were helping users rather than for internal purposes and who gives a @#$% about the users.

    I don’t have Access 2010, but I’d be curios to know what CSV files are called in it.

  2. i use 2003 and 2010. i still use 2003 as my main version. i just add the norereg keys in the registry so office 2010 doesn’t auto-register itself and have no issues with both installed. if i want to open and xls in 2010, i just to open 2010 and open it through hte file/open dialog or drag it into the open workbook.

    when i hover over a csv in windows explorer, it says microsoft office excel comma sep;arated values file.

  3. Dick,

    If you want CSV files, then why not simply:

    If fsoFile.DateLastModified > dtNew And LCase(fsoFile.Name) Like “*.csv” Then

    :)

    Patrick


Posting code? Use <pre> tags for VBA and <code> tags for inline.

Leave a Reply

Your email address will not be published.