macro translated from spanish run time error

SamS

Well-known Member
Joined
Feb 17, 2002
Messages
542
Have received a spreadsheet which was originally in spanish and the VBA code was translated to english but none of the code will run, as I keep getting a run time error. Recorded a new macro and when tried playing it back same problem, error message as follows when trying to select a worksheet:

Run_Time_Error '-2147319784 (80028018)':
Method 'Select' of object 'Worksheet' failed

the same message appears if I even try to just select a range, any ideas?
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
On 2002-10-28 18:59, Juan Pablo G. wrote:
Can you post the code (Not the ENTIRE code, just the problem code) ?

Juan, after trying to run the code and getting the error message I input this code:

Sub General()

Sheets("Acum1").Select
Range("b5").Select

End Sub

and the error occurs on the first line (the worksheet name is valid and exists). Near as I can figure is that it doesn't like English - the workbook is all in Spanish.
_________________<font size=+1.<fontcolor="Blue">Sam</font size=+1.</fontcolor="Blue">
Why is it that the nuttiest people define reality?
This message was edited by SamS on 2002-10-28 20:13
 
Upvote 0
Hey, are you trying to offend me there ? :wink: (J/k)

Since Excel 97, all VBA code is written in english, so, unless you're using an older version than that one, the code should run fine.
 
Upvote 0
On 2002-10-28 20:26, Juan Pablo G. wrote:
Hey, are you trying to offend me there ? :wink: (J/k)

Since Excel 97, all VBA code is written in english, so, unless you're using an older version than that one, the code should run fine.

And here I was thinking I may have offended the English :biggrin:

The workbook was sent to me from Mexico - when I opened it a Visual Basic message popped saying "The Project has been transaleted into English". When I selected the Help button it said there was Topic does not exist. All the data is still in Spanish and the modules (10 of them) are in English and in all cases the error messages pop up when I try to Step through them, even the one I recorded (to make sure it worked).
 
Upvote 0
Thanks Ivan, I will follow this up and let all know if there was any change. I am in the process of cleaning some of the code manually at the moment as the user has created a number of modules but used the same Sub name() in a lot of them. I was hoping that this may have caused the problem.
 
Upvote 0
On 2002-10-28 23:08, SamS wrote:
Thanks Ivan, I will follow this up and let all know if there was any change. I am in the process of cleaning some of the code manually at the moment as the user has created a number of modules but used the same Sub name() in a lot of them. I was hoping that this may have caused the problem.

**** - I can't install the code cleaner as my OS is NT4 and it will take 2 days :( :( for our IT dept to install it (if they agree to it that is)- will work away manually and keep you posted
 
Upvote 0
no luck in this dept - our IT has refused to install the code cleaner and I have worked around the problem by copying and pasting data and working into a new workbook and only working with the code I need - thanks for all your help.

PS: Have loaded the code cleaner at home for my own use
 
Upvote 0

Forum statistics

Threads
1,214,652
Messages
6,120,747
Members
448,989
Latest member
mariah3

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