Excel/.formula does not work in french setting
I have tried to find the solution to this problem for 2 days now and hope you can help me.
I am "importing" data from one workbook to another using the following code. it works very well on an english computer, but falls on a french computer. (I have created a mini macro just to recreate that problem and could send you the workbooks)
the part that does not work on the french computer is .formula
I understand that it would not work if the formula contained Excel function such as SUM etc as it would have to be written in french (SOMME), but in this particular case the formula involves only the path, the name of the file, the sheet and the range.
it would be great if you could help me.
thanks a lot. as usual your help is greatly appreciated.
Application.ScreenUpdating = False
Dim myworkbook As String
myworkbook = ThisWorkbook.Path & "\" & Range("WorkbookNameCell").Value
'check workbook exists
If FileFolderExists(myworkbook) Then
Dim mydata As String
mydata = "='" & ThisWorkbook.Path & "\" & "[" & Range("WorkbookNameCell").Value & "]sheet1'!Export1"
.Formula = mydata
.Value = .Value
MsgBox (" The file " & Range("WorkbookNameCell").Value & " does not exist!")
VBA should be fine because it's always written in english regardless of the language - I WONDER if the error trapper is giving you a false indication of where the error is though because you are using FileFolderExists which isn't native to excel so MAY be the cause of the error?
I am of course probably wrong (!) and I'm more than happy to look at a file to see if I can spot anything else that may be the cause of the problem- email being firstname.lastname@example.org
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