|re: it causes an error|
That is a very generic statement. Could you be more specific as the the error? What does the text say, what is the error number, "who" is presenting the error (VBA, Excel, the OS), etc.
Have you checked the security settings within Excel on each machine? Each individual instance of Excel has to have the Macro security setting set to allow macros to run and this has to be done manually by the user. You can not force the setting to allow macros to run via a macro due the security related problems that that could cause.
Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.