Simple VBA code working in both english german and french versions of excel?

mboas

New Member
Joined
Dec 28, 2016
Messages
14
Hello friends.

I have a code i used in several worksheets, however some are german french and english - how do i make sure the same code works in all - or alternatively, how do i figure out the other language variations to the same code? The code is below and works fine in english excel but not in german.

I have the following code:

Code:
Sub CloseMonth()    Sheets(1).Select
    For j = 2 To Sheets().Count - 2
        Sheets(j).Select
        Col = Range("B20").Value
        Range("K2:K9").Select
        Selection.Copy
        Cells(26, Col).Select
        Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
            False, Transpose:=False
    Next
    Sheets(1).Select
    Calculate
End Sub

Any help would be greatly appreciated.
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Hi mboas,

Are you sure this code is not working in a German version of Excel? VBA should be language-neutral to my knowledge, especially the parts you are using above.
Could there be another reason your code does not work in the German version you are testing with?

Regards,
Bernd
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,325
Members
452,635
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top