Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Urgent! Compatibility between English and German VBA

Status
Not open for further replies.

VBAva

Programmer
Jul 29, 2003
87
0
0
IE
hello.

i have come pretty much to the end of my project but encountered a problem when running it on a different machine.
My computer is set up in English with English Excel, but my co-workers have German versions of windows and Excel.

The little application ( i konw its technically a macro) that i have written works fine on my machine but not on the german ones ,there is a problem with one line which causes an error (Runtime Error '-2147417848(80010108)') which causes a program failure and it exits Excel.

this is where the error occurs
Code:
Public Sub AddInCode()
    Dim FName As String

    FileVersion = "Calculator7.21_Ger2.xls"
    With Workbooks(FileVersion)
        FName = .Path & "\code.txt"
        .VBProject.VBComponents("basMenuChange").Export FName
    End With
    Workbooks(FileX).VBProject.VBComponents.Import FName
End Sub
[\code]

the error occurs on the Import line. It knows what FileX and FName are, and the export part works perfectly, and everything after the import works fine if the line is commented out so i dotn know what is happening.

i would really appreciate any suggestions

Help !!!

Ava
 
Interesting...

i seem to have fixed the problem but i have no idea why it works now...

When the file is exported as .bas instead of .txt it works fine.
it used to work in the german version with .txt but not anymore.
.txt or .bas works in the english one
does anyone know why??
this has me confused.

Ava

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top