You are here:

Excel/Open Files without Case sensitive


Hi Jerry,

Kindly help me in this VBA, now I'm using the following VBA code to open a workbook:

Analyst1 = Range("AK7")
Workbooks.Open Filename:=Analyst1

The Range AK7 contains "D:\Jay\NEWAnalyst1.xlsm"
The File opens properly but my problem is, If I save the File as "ANaLyst1" or "analyst1", then the macro turns case sensitive and problem in opening the file. Could you please suggest to remove case sensitive from the coding, and kindly suggest me the coding to open the file if it is in lower or upper or in any case.

Hm, that does not follow what I know about filenames, they are not case sensitive.

I have a file named "GED STATS.xlsx" in my C:\2013\ folder.   I put this text into cell K7:

     "C:2013\ged stats.xlsx"

Notice the case is completely wrong?  Then this one line of code opened that file correctly:

     Workbooks.Open Range("K7")

I'd be more likely to suspect some other difference in the new filename, such as hidden spaces.
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here


All Answers

Answers by Expert:

Ask Experts


Jerry Beaucaire


Excel Formulas, macros, automation. Microsoft Excel MVP - 2010. Code site with free code snippets and techniques:


Microsoft Excel MVP - 2010. I have my own extensive Excel help/code site: ===================== I have been offering free assistance as an Excel aid on many web sites for many years: ( - JBeaucaire) ======== ( - JBeaucaire) ======= ( - jbeaucaire)

Bachelor's Degree from Azusa Pacific University in Mathematics and Music Composition

Awards and Honors
Microsoft Excel MVP 2010

©2016 All rights reserved.