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

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
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,224,827
Messages
6,181,197
Members
453,022
Latest member
RobertV1609

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