Macro Filter for Blank Fields

M

Michael

I need some help with a macro. I am using Project 2007 standard. I tried to
record a macro that would filter on a column, doing a custom filter that
selects those fields that are not blank, using “does not contain†and leaving
the next field blank. The macro recorder will not record my steps, is the
macro code easy to write for something like this?
Thanks, Michael
 
J

Jack Dahlgren MVP

Not sure why the macro recorder isn't working for you. When I create a
filter for blank values in the text1 field I get the following code:
Sub filterText1Blanks()
'Note: I added line continuation characters for readability.
FilterEdit Name:="Text1Blank", _
TaskFilter:=True, _
Create:=True, _
OverwriteExisting:=True, _
FieldName:="Text1", _
Test:="does not equal", _
Value:="", _
ShowInMenu:=False, _
ShowSummaryTasks:=False

FilterApply Name:="Text1Blank"
End Sub

You can change the field name and the code should work just like that.
-Jack Dahlgren
 

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