Anybody remember Excel4Macro's

M

michael.beckinsale

Hi All,

Using the following code l can launch the Custom Auto Filter
(dialog???) and set the 'show rows where:' to 'begins with' The
downside is that is places a ? in the criteria box and the criteria box
takes the focus.

Can anybody help in modifying the code to avoid placing the ? in the
criteria box and it taking focus whilst still setting the 'show rows
where:' to 'begins with'

Application.ExecuteExcel4Macro "Filter?(1,""?*"")"

Additionally is there any risk attached to using Excel4Macro's in Excel
2000 to 2003 versions?

Regards

Michael beckinsale
 
P

Peter T

Hi Michael,

This seems show the dialog without the ? but with the same list in the
criteria dropdown

Application.ExecuteExcel4Macro "Filter?(1,"""")"

though focus still as you described.

There must be an Application.Dialogs(xl-?) for this, surely, but in a quick
glance I couldn't find it.
Additionally is there any risk attached to using Excel4Macro's in Excel
2000 to 2003 versions?

Not sure there's any risk though I've noticed some systems give one-off
warning for user to accept Excel 4 macros (anti virus kicking in perhaps).

FWIW the help topic pasted below

Regards,
Peter T

FILTER [Excel4]
Syntax

FILTER(field_num, criteria1, operation, criteria2)
FILTER?(field_num, criteria1, operation, criteria2)
Field_num is the number of the field that you want to filter. Fields are
numbered from left to right starting with 1.
Criteria1 is a text string specifying criteria for filtering a list, such
as ">2". If you want to include all items in the list, omit this argument.
Operation is a number that specifies how you want criteria2 used with
criteria1:

Number Operation Used

1 or omitted AND
2 OR

Criteria2 is a text string specifying criteria for filtering a list, such
as ">2". If you include this argument, operation is required.

Remarks

If you omit all arguments, FILTER toggles the display of filter arrows.
 
W

wisccal

Excel seems to expect one or more printable characters before the * to
actually change the dropdown selection. You could do something like:

Application.Dialogs(xlDialogFilter).Show 1, "Enter Here*"

This should be pretty clear for the user.

Regards,
Steve

Peter said:
Hi Michael,

This seems show the dialog without the ? but with the same list in the
criteria dropdown

Application.ExecuteExcel4Macro "Filter?(1,"""")"

though focus still as you described.

There must be an Application.Dialogs(xl-?) for this, surely, but in a quick
glance I couldn't find it.
Additionally is there any risk attached to using Excel4Macro's in Excel
2000 to 2003 versions?

Not sure there's any risk though I've noticed some systems give one-off
warning for user to accept Excel 4 macros (anti virus kicking in perhaps).

FWIW the help topic pasted below

Regards,
Peter T

FILTER [Excel4]
Syntax

FILTER(field_num, criteria1, operation, criteria2)
FILTER?(field_num, criteria1, operation, criteria2)
Field_num is the number of the field that you want to filter. Fields are
numbered from left to right starting with 1.
Criteria1 is a text string specifying criteria for filtering a list, such
as ">2". If you want to include all items in the list, omit this argument.
Operation is a number that specifies how you want criteria2 used with
criteria1:

Number Operation Used

1 or omitted AND
2 OR

Criteria2 is a text string specifying criteria for filtering a list, such
as ">2". If you include this argument, operation is required.

Remarks

If you omit all arguments, FILTER toggles the display of filter arrows.


michael.beckinsale said:
Hi All,

Using the following code l can launch the Custom Auto Filter
(dialog???) and set the 'show rows where:' to 'begins with' The
downside is that is places a ? in the criteria box and the criteria box
takes the focus.

Can anybody help in modifying the code to avoid placing the ? in the
criteria box and it taking focus whilst still setting the 'show rows
where:' to 'begins with'

Application.ExecuteExcel4Macro "Filter?(1,""?*"")"

Additionally is there any risk attached to using Excel4Macro's in Excel
2000 to 2003 versions?

Regards

Michael beckinsale
 
M

michael.beckinsale

Peter / Wiscal,

Thanks for the input.

Peter - where did you get the Excel4Macro info from?

Wiscal - The code you provided does not show the filter dialog box we
are talking about but thanks for taking the time to help out.

Regards


Michael Beckinsale
 
P

Peter T

Peter - where did you get the Excel4Macro info from?

Excel 7.0/97 Macro Function Help File for Excel 4.0 Macros (Macrofun.exe)
http://www.microsoft.com/downloads/details.aspx?familyid=10B40A6B-7485-437A-
819B-0F446F74ED81&displaylang=en

Excel 97 Help: Creating Version 4.0 Macros in Excel 97 (Macro97.exe)
http://www.microsoft.com/downloads/details.aspx?FamilyID=94be9dfa-8a84-4155-
b75f-f29b15d5629f&displaylang=en

Excel 2000 Help File: Running Excel 4.0 Macros (xlmacro.exe)
http://www.microsoft.com/downloads/details.aspx?familyid=C09BF7F7-D30E-4CE9-
8930-5D03748CA5CD&displaylang=en

I only have the 'original' Macrofun.hlp from which I pasted the info.
If you get both that and a later version and find one of the later versions
includes additional useful information could you let me know!

Regards,
Peter T
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top