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

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

SamS

Well-known Member
Joined
Feb 17, 2002
Messages
542
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
 

Juan Pablo González

MrExcel MVP
Joined
Feb 8, 2002
Messages
11,959
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.
 

SamS

Well-known Member
Joined
Feb 17, 2002
Messages
542

ADVERTISEMENT

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).
 

SamS

Well-known Member
Joined
Feb 17, 2002
Messages
542

ADVERTISEMENT

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.
 

SamS

Well-known Member
Joined
Feb 17, 2002
Messages
542
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
 

SamS

Well-known Member
Joined
Feb 17, 2002
Messages
542
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
 

Forum statistics

Threads
1,143,640
Messages
5,719,985
Members
422,256
Latest member
downeybm

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
Top