ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Calling macros width arguments in winxp (https://www.excelbanter.com/excel-programming/281024-calling-macros-width-arguments-winxp.html)

Isidro Vila Verde

Calling macros width arguments in winxp
 
Dear All,

I need your help.

What I have is a woorbook wih a lot o sheets and in the first sheet I
put a button for each sheet associated with a macro and a argument
('gotows "sheet1"'), wich is the name of worksheet that I want to
jump.
This is the code:

Public Sub gotows(m As String)
ActiveWorkbook.Worksheets(m).Activate
End Sub

And it work fine in my win2k pro with excel 2002.

But when I try to run it on a winxp, also with excel 2002, the actions
associated with buttons 'gotows "sheet1"' do nothing. But if I call a
macro without any arguments it work fine. The problems is just the
macros with args.

Can you help me please,

Isidro

Tom Ogilvy

Calling macros width arguments in winxp
 
Using arguments in Onaction macros is not a documented capability. There
have been reports that it isn't supported in xl2002 or event back to xl2000
with SP3 (as I recall). Yours is the first I have seen that said it was
supported in xl2002 and the difference is in the operating system version.

Anyway, If it doesn't work, I don't think there is a way to make it work.
Just to let you know that there is such a problem.

--
Regards,
Tom Ogilvy

"Isidro Vila Verde" wrote in message
om...
Dear All,

I need your help.

What I have is a woorbook wih a lot o sheets and in the first sheet I
put a button for each sheet associated with a macro and a argument
('gotows "sheet1"'), wich is the name of worksheet that I want to
jump.
This is the code:

Public Sub gotows(m As String)
ActiveWorkbook.Worksheets(m).Activate
End Sub

And it work fine in my win2k pro with excel 2002.

But when I try to run it on a winxp, also with excel 2002, the actions
associated with buttons 'gotows "sheet1"' do nothing. But if I call a
macro without any arguments it work fine. The problems is just the
macros with args.

Can you help me please,

Isidro




Isidro Vila Verde

Calling macros width arguments in winxp
 
So I need to change my strategie...

Thank you very much, Tom, for your info.

Regards

Isidro
PS: in xl2002 + win2k it work fine in several computers that I try.


"Tom Ogilvy" wrote in message ...
Using arguments in Onaction macros is not a documented capability. There
have been reports that it isn't supported in xl2002 or event back to xl2000
with SP3 (as I recall). Yours is the first I have seen that said it was
supported in xl2002 and the difference is in the operating system version.

Anyway, If it doesn't work, I don't think there is a way to make it work.
Just to let you know that there is such a problem.

--
Regards,
Tom Ogilvy

"Isidro Vila Verde" wrote in message
om...
Dear All,

I need your help.

What I have is a woorbook wih a lot o sheets and in the first sheet I
put a button for each sheet associated with a macro and a argument
('gotows "sheet1"'), wich is the name of worksheet that I want to
jump.
This is the code:

Public Sub gotows(m As String)
ActiveWorkbook.Worksheets(m).Activate
End Sub

And it work fine in my win2k pro with excel 2002.

But when I try to run it on a winxp, also with excel 2002, the actions
associated with buttons 'gotows "sheet1"' do nothing. But if I call a
macro without any arguments it work fine. The problems is just the
macros with args.

Can you help me please,

Isidro



All times are GMT +1. The time now is 03:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com