language of Office for vba commands

eran3185

Board Regular
Joined
Apr 28, 2007
Messages
142
Hi

I need to use this line of code:
Range("A1").Select
ActiveSheet.PasteSpecial Format:="text", Link:=False, DisplayAsIcon:= False
The problem: When I use another computer with Office in another language (not English) the command is different ("text" in another language) and I get 1004 error.
Is there a way to write the same command that will "fit" any language of Office ?

TNX
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
So does that work on your machine? I cant find a pastespecial option to paste as text. Change the cell format to text first then pastespecial values.
 
Upvote 0
Hi

I need to use this line of code:
Range("A1").Select
ActiveSheet.PasteSpecial Format:="text", Link:=False, DisplayAsIcon:= False
The problem: When I use another computer with Office in another language (not English) the command is different ("text" in another language) and I get 1004 error.
Is there a way to write the same command that will "fit" any language of Office ?

TNX

You could find out about the equivalent of the word "text" in the other langauge and replace text with it .

I personally use a French edition of Office and I just replace "text" with "texte"

Also, how about using the PasteSpecial Method of the Range object instead of that of the Worksheet object ... Something like :

Code:
Range("A1").PasteSpecial xlPasteAll
This shouldn't paste any color formatting if that's what you are trying to avoid.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,325
Messages
6,124,254
Members
449,149
Latest member
mwdbActuary

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