Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Repost: Looking for info on how to program a userform to use filters

http://www.microsoft.com/ExcelDev/Articles/sxs11pt1.htm
Lesson 11: Creating a Custom Form
Excerpted from Microsoft® Excel 97 Visual Basic® Step by Step.

http://support.microsoft.com/default.aspx?kbid=161514
XL97: How to Use a UserForm for Entering Data

http://support.microsoft.com/default.aspx?kbid=213749
XL2000: How to Use a UserForm for Entering Data


What you mean by filter is not very clear. Are you trying to filter
information shown in a listbox on the form or use the form to get setttings
for an autofilter (as an example) on a worksheet?

Regards,
Tom Ogilvy



"Bruccce" wrote in message
news:uJRXa.72449$YN5.55027@sccrnsc01...
I am trying to create a userform that I can set filters in. I am looking

for
how to do this.

I have tried creating a macro that sets the filter I want, and put it in

the
userform, and assigned this to a button, but userform does not seem to
recognize the filter. It still shows every record. What am I doing wrong

Where can I find this info? (I have several books, but I can not find this
combination covered....)

I have had somebody create a userform for me, but I need to change the
filter, and I need to change a lot of other items about the form, so I

want
to basically start from scratch.

I would like to LEARN how to do this so I can maintain my own code.

thanks
Bruce




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Repost: Looking for info on how to program a userform to use filters

What you mean by filter is not very clear. Are you trying to filter
information shown in a listbox on the form or use the form to get setttings
for an autofilter (as an example) on a worksheet?
What I want to do, is to look at only certain sets of information while I am
using my form.

Example:
I am calling people, nationwide. I might want to set it where I am only
seeing people in MY timezone, that I have not talked to yet.

Columns that I would create an autofilter on would be timezone and call
results
Here is a filter that works while in the spreadsheet:
Sub TimeZoneVoiceDrop()
'
' TimeZoneVoiceDrop Macro
' Macro recorded 8/5/2003 by Bruce
'

'
Selection.AutoFilter
ActiveWindow.ScrollColumn = 61
ActiveWindow.ScrollColumn = 56
ActiveWindow.ScrollColumn = 54
ActiveWindow.ScrollColumn = 53
ActiveWindow.ScrollColumn = 51
ActiveWindow.ScrollColumn = 50
ActiveWindow.ScrollColumn = 48
ActiveWindow.ScrollColumn = 47
ActiveWindow.ScrollColumn = 46
ActiveWindow.ScrollColumn = 45
ActiveWindow.ScrollColumn = 44
ActiveWindow.ScrollColumn = 43
ActiveWindow.ScrollColumn = 42
ActiveWindow.ScrollColumn = 41
ActiveWindow.ScrollColumn = 39
ActiveWindow.ScrollColumn = 38
ActiveWindow.ScrollColumn = 36
ActiveWindow.ScrollColumn = 35
ActiveWindow.ScrollColumn = 32
ActiveWindow.ScrollColumn = 31
ActiveWindow.ScrollColumn = 29
ActiveWindow.ScrollColumn = 28
ActiveWindow.ScrollColumn = 27
ActiveWindow.ScrollColumn = 25
ActiveWindow.ScrollColumn = 24
ActiveWindow.ScrollColumn = 23
ActiveWindow.ScrollColumn = 22
ActiveWindow.ScrollColumn = 21
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 16
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 14
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 3
Selection.AutoFilter Field:=7, Criteria1:="0"
Selection.AutoFilter Field:=10, Criteria1:="Voice Drop"
End Sub

And it only shows 13 records with my current data set.
However, when I launch my userform, it show ALL records. It does not pay
attention to any filters I have in place. I have tried to assign the
filtermacro to a user button, but that did not help either....

I hope this is clearer than mud...

Bruce



"Tom Ogilvy" wrote in message
...
http://www.microsoft.com/ExcelDev/Articles/sxs11pt1.htm
Lesson 11: Creating a Custom Form
Excerpted from Microsoft® Excel 97 Visual Basic® Step by Step.

http://support.microsoft.com/default.aspx?kbid=161514
XL97: How to Use a UserForm for Entering Data

http://support.microsoft.com/default.aspx?kbid=213749
XL2000: How to Use a UserForm for Entering Data


What you mean by filter is not very clear. Are you trying to filter
information shown in a listbox on the form or use the form to get

setttings
for an autofilter (as an example) on a worksheet?

Regards,
Tom Ogilvy



"Bruccce" wrote in message
news:uJRXa.72449$YN5.55027@sccrnsc01...
I am trying to create a userform that I can set filters in. I am looking

for
how to do this.

I have tried creating a macro that sets the filter I want, and put it in

the
userform, and assigned this to a button, but userform does not seem to
recognize the filter. It still shows every record. What am I doing wrong

Where can I find this info? (I have several books, but I can not find

this
combination covered....)

I have had somebody create a userform for me, but I need to change the
filter, and I need to change a lot of other items about the form, so I

want
to basically start from scratch.

I would like to LEARN how to do this so I can maintain my own code.

thanks
Bruce






  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Repost: Looking for info on how to program a userform to use filters

Private Sub Commandbutton1_Click()
if Activesheet.AutofilterMode then
Activesheet.AutoFilter.Range.Select
Else
Range("A1").CurrentRegion.Select
End if
Selection.AutoFilter Field:=7, Criteria1:="0"
Selection.AutoFilter Field:=10, Criteria1:="Voice Drop"
End Sub

Regards,
Tom Ogilvy


Bruccce wrote in message
news:_cUXa.71967$Ho3.9474@sccrnsc03...
What you mean by filter is not very clear. Are you trying to filter
information shown in a listbox on the form or use the form to get

setttings
for an autofilter (as an example) on a worksheet?
What I want to do, is to look at only certain sets of information while I

am
using my form.

Example:
I am calling people, nationwide. I might want to set it where I am only
seeing people in MY timezone, that I have not talked to yet.

Columns that I would create an autofilter on would be timezone and call
results
Here is a filter that works while in the spreadsheet:
Sub TimeZoneVoiceDrop()
'
' TimeZoneVoiceDrop Macro
' Macro recorded 8/5/2003 by Bruce
'

'
Selection.AutoFilter
ActiveWindow.ScrollColumn = 61
ActiveWindow.ScrollColumn = 56
ActiveWindow.ScrollColumn = 54
ActiveWindow.ScrollColumn = 53
ActiveWindow.ScrollColumn = 51
ActiveWindow.ScrollColumn = 50
ActiveWindow.ScrollColumn = 48
ActiveWindow.ScrollColumn = 47
ActiveWindow.ScrollColumn = 46
ActiveWindow.ScrollColumn = 45
ActiveWindow.ScrollColumn = 44
ActiveWindow.ScrollColumn = 43
ActiveWindow.ScrollColumn = 42
ActiveWindow.ScrollColumn = 41
ActiveWindow.ScrollColumn = 39
ActiveWindow.ScrollColumn = 38
ActiveWindow.ScrollColumn = 36
ActiveWindow.ScrollColumn = 35
ActiveWindow.ScrollColumn = 32
ActiveWindow.ScrollColumn = 31
ActiveWindow.ScrollColumn = 29
ActiveWindow.ScrollColumn = 28
ActiveWindow.ScrollColumn = 27
ActiveWindow.ScrollColumn = 25
ActiveWindow.ScrollColumn = 24
ActiveWindow.ScrollColumn = 23
ActiveWindow.ScrollColumn = 22
ActiveWindow.ScrollColumn = 21
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 16
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 14
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 3
Selection.AutoFilter Field:=7, Criteria1:="0"
Selection.AutoFilter Field:=10, Criteria1:="Voice Drop"
End Sub

And it only shows 13 records with my current data set.
However, when I launch my userform, it show ALL records. It does not pay
attention to any filters I have in place. I have tried to assign the
filtermacro to a user button, but that did not help either....

I hope this is clearer than mud...

Bruce



"Tom Ogilvy" wrote in message
...
http://www.microsoft.com/ExcelDev/Articles/sxs11pt1.htm
Lesson 11: Creating a Custom Form
Excerpted from Microsoft® Excel 97 Visual Basic® Step by Step.

http://support.microsoft.com/default.aspx?kbid=161514
XL97: How to Use a UserForm for Entering Data

http://support.microsoft.com/default.aspx?kbid=213749
XL2000: How to Use a UserForm for Entering Data


What you mean by filter is not very clear. Are you trying to filter
information shown in a listbox on the form or use the form to get

setttings
for an autofilter (as an example) on a worksheet?

Regards,
Tom Ogilvy



"Bruccce" wrote in message
news:uJRXa.72449$YN5.55027@sccrnsc01...
I am trying to create a userform that I can set filters in. I am

looking
for
how to do this.

I have tried creating a macro that sets the filter I want, and put it

in
the
userform, and assigned this to a button, but userform does not seem

to
recognize the filter. It still shows every record. What am I doing

wrong

Where can I find this info? (I have several books, but I can not find

this
combination covered....)

I have had somebody create a userform for me, but I need to change the
filter, and I need to change a lot of other items about the form, so I

want
to basically start from scratch.

I would like to LEARN how to do this so I can maintain my own code.

thanks
Bruce








  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Repost: Looking for info on how to program a userform to use filters

Tom,

This, in concept, is what I thought should work. but when I try it, ALL
records are still shown.
Could this possibly be be cause of my navigation, loading of the userform?

Bruce

"Tom Ogilvy" wrote in message
...
Private Sub Commandbutton1_Click()
if Activesheet.AutofilterMode then
Activesheet.AutoFilter.Range.Select
Else
Range("A1").CurrentRegion.Select
End if
Selection.AutoFilter Field:=7, Criteria1:="0"
Selection.AutoFilter Field:=10, Criteria1:="Voice Drop"
End Sub

Regards,
Tom Ogilvy


Bruccce wrote in message
news:_cUXa.71967$Ho3.9474@sccrnsc03...
What you mean by filter is not very clear. Are you trying to

filter
information shown in a listbox on the form or use the form to get

setttings
for an autofilter (as an example) on a worksheet?
What I want to do, is to look at only certain sets of information while

I
am
using my form.

Example:
I am calling people, nationwide. I might want to set it where I am only
seeing people in MY timezone, that I have not talked to yet.

Columns that I would create an autofilter on would be timezone and call
results
Here is a filter that works while in the spreadsheet:
Sub TimeZoneVoiceDrop()
'
' TimeZoneVoiceDrop Macro
' Macro recorded 8/5/2003 by Bruce
'

'
Selection.AutoFilter
ActiveWindow.ScrollColumn = 61
ActiveWindow.ScrollColumn = 56
ActiveWindow.ScrollColumn = 54
ActiveWindow.ScrollColumn = 53
ActiveWindow.ScrollColumn = 51
ActiveWindow.ScrollColumn = 50
ActiveWindow.ScrollColumn = 48
ActiveWindow.ScrollColumn = 47
ActiveWindow.ScrollColumn = 46
ActiveWindow.ScrollColumn = 45
ActiveWindow.ScrollColumn = 44
ActiveWindow.ScrollColumn = 43
ActiveWindow.ScrollColumn = 42
ActiveWindow.ScrollColumn = 41
ActiveWindow.ScrollColumn = 39
ActiveWindow.ScrollColumn = 38
ActiveWindow.ScrollColumn = 36
ActiveWindow.ScrollColumn = 35
ActiveWindow.ScrollColumn = 32
ActiveWindow.ScrollColumn = 31
ActiveWindow.ScrollColumn = 29
ActiveWindow.ScrollColumn = 28
ActiveWindow.ScrollColumn = 27
ActiveWindow.ScrollColumn = 25
ActiveWindow.ScrollColumn = 24
ActiveWindow.ScrollColumn = 23
ActiveWindow.ScrollColumn = 22
ActiveWindow.ScrollColumn = 21
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 16
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 14
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 3
Selection.AutoFilter Field:=7, Criteria1:="0"
Selection.AutoFilter Field:=10, Criteria1:="Voice Drop"
End Sub

And it only shows 13 records with my current data set.
However, when I launch my userform, it show ALL records. It does not pay
attention to any filters I have in place. I have tried to assign the
filtermacro to a user button, but that did not help either....

I hope this is clearer than mud...

Bruce



"Tom Ogilvy" wrote in message
...
http://www.microsoft.com/ExcelDev/Articles/sxs11pt1.htm
Lesson 11: Creating a Custom Form
Excerpted from Microsoft® Excel 97 Visual Basic® Step by Step.

http://support.microsoft.com/default.aspx?kbid=161514
XL97: How to Use a UserForm for Entering Data

http://support.microsoft.com/default.aspx?kbid=213749
XL2000: How to Use a UserForm for Entering Data


What you mean by filter is not very clear. Are you trying to filter
information shown in a listbox on the form or use the form to get

setttings
for an autofilter (as an example) on a worksheet?

Regards,
Tom Ogilvy



"Bruccce" wrote in message
news:uJRXa.72449$YN5.55027@sccrnsc01...
I am trying to create a userform that I can set filters in. I am

looking
for
how to do this.

I have tried creating a macro that sets the filter I want, and put

it
in
the
userform, and assigned this to a button, but userform does not seem

to
recognize the filter. It still shows every record. What am I doing

wrong

Where can I find this info? (I have several books, but I can not

find
this
combination covered....)

I have had somebody create a userform for me, but I need to change

the
filter, and I need to change a lot of other items about the form, so

I
want
to basically start from scratch.

I would like to LEARN how to do this so I can maintain my own code.

thanks
Bruce










  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Repost: Looking for info on how to program a userform to use filters

Code works on the active sheet - not sure what you mean by navigation.

Regards,
Tom Ogilvy

"Bruccce" wrote in message
news:yR_Xa.50867$cF.18912@rwcrnsc53...
Tom,

This, in concept, is what I thought should work. but when I try it, ALL
records are still shown.
Could this possibly be be cause of my navigation, loading of the userform?

Bruce

"Tom Ogilvy" wrote in message
...
Private Sub Commandbutton1_Click()
if Activesheet.AutofilterMode then
Activesheet.AutoFilter.Range.Select
Else
Range("A1").CurrentRegion.Select
End if
Selection.AutoFilter Field:=7, Criteria1:="0"
Selection.AutoFilter Field:=10, Criteria1:="Voice Drop"
End Sub

Regards,
Tom Ogilvy


Bruccce wrote in message
news:_cUXa.71967$Ho3.9474@sccrnsc03...
What you mean by filter is not very clear. Are you trying to

filter
information shown in a listbox on the form or use the form to get

setttings
for an autofilter (as an example) on a worksheet?
What I want to do, is to look at only certain sets of information

while
I
am
using my form.

Example:
I am calling people, nationwide. I might want to set it where I am

only
seeing people in MY timezone, that I have not talked to yet.

Columns that I would create an autofilter on would be timezone and

call
results
Here is a filter that works while in the spreadsheet:
Sub TimeZoneVoiceDrop()
'
' TimeZoneVoiceDrop Macro
' Macro recorded 8/5/2003 by Bruce
'

'
Selection.AutoFilter
ActiveWindow.ScrollColumn = 61
ActiveWindow.ScrollColumn = 56
ActiveWindow.ScrollColumn = 54
ActiveWindow.ScrollColumn = 53
ActiveWindow.ScrollColumn = 51
ActiveWindow.ScrollColumn = 50
ActiveWindow.ScrollColumn = 48
ActiveWindow.ScrollColumn = 47
ActiveWindow.ScrollColumn = 46
ActiveWindow.ScrollColumn = 45
ActiveWindow.ScrollColumn = 44
ActiveWindow.ScrollColumn = 43
ActiveWindow.ScrollColumn = 42
ActiveWindow.ScrollColumn = 41
ActiveWindow.ScrollColumn = 39
ActiveWindow.ScrollColumn = 38
ActiveWindow.ScrollColumn = 36
ActiveWindow.ScrollColumn = 35
ActiveWindow.ScrollColumn = 32
ActiveWindow.ScrollColumn = 31
ActiveWindow.ScrollColumn = 29
ActiveWindow.ScrollColumn = 28
ActiveWindow.ScrollColumn = 27
ActiveWindow.ScrollColumn = 25
ActiveWindow.ScrollColumn = 24
ActiveWindow.ScrollColumn = 23
ActiveWindow.ScrollColumn = 22
ActiveWindow.ScrollColumn = 21
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 16
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 14
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 3
Selection.AutoFilter Field:=7, Criteria1:="0"
Selection.AutoFilter Field:=10, Criteria1:="Voice Drop"
End Sub

And it only shows 13 records with my current data set.
However, when I launch my userform, it show ALL records. It does not

pay
attention to any filters I have in place. I have tried to assign the
filtermacro to a user button, but that did not help either....

I hope this is clearer than mud...

Bruce



"Tom Ogilvy" wrote in message
...
http://www.microsoft.com/ExcelDev/Articles/sxs11pt1.htm
Lesson 11: Creating a Custom Form
Excerpted from Microsoft® Excel 97 Visual Basic® Step by Step.

http://support.microsoft.com/default.aspx?kbid=161514
XL97: How to Use a UserForm for Entering Data

http://support.microsoft.com/default.aspx?kbid=213749
XL2000: How to Use a UserForm for Entering Data


What you mean by filter is not very clear. Are you trying to filter
information shown in a listbox on the form or use the form to get
setttings
for an autofilter (as an example) on a worksheet?

Regards,
Tom Ogilvy



"Bruccce" wrote in message
news:uJRXa.72449$YN5.55027@sccrnsc01...
I am trying to create a userform that I can set filters in. I am

looking
for
how to do this.

I have tried creating a macro that sets the filter I want, and put

it
in
the
userform, and assigned this to a button, but userform does not

seem
to
recognize the filter. It still shows every record. What am I doing

wrong

Where can I find this info? (I have several books, but I can not

find
this
combination covered....)

I have had somebody create a userform for me, but I need to change

the
filter, and I need to change a lot of other items about the form,

so
I
want
to basically start from scratch.

I would like to LEARN how to do this so I can maintain my own

code.

thanks
Bruce














  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Repost: Looking for info on how to program a userform to use filters

On my userform, I have a next/prev button, and when I use these, it goes to
the next record that is in the worksheet, not the "filter" set

Bruce

"Tom Ogilvy" wrote in message
...
Code works on the active sheet - not sure what you mean by navigation.

Regards,
Tom Ogilvy

"Bruccce" wrote in message
news:yR_Xa.50867$cF.18912@rwcrnsc53...
Tom,

This, in concept, is what I thought should work. but when I try it, ALL
records are still shown.
Could this possibly be be cause of my navigation, loading of the

userform?

Bruce

"Tom Ogilvy" wrote in message
...
Private Sub Commandbutton1_Click()
if Activesheet.AutofilterMode then
Activesheet.AutoFilter.Range.Select
Else
Range("A1").CurrentRegion.Select
End if
Selection.AutoFilter Field:=7, Criteria1:="0"
Selection.AutoFilter Field:=10, Criteria1:="Voice Drop"
End Sub

Regards,
Tom Ogilvy


Bruccce wrote in message
news:_cUXa.71967$Ho3.9474@sccrnsc03...
What you mean by filter is not very clear. Are you trying to

filter
information shown in a listbox on the form or use the form to get
setttings
for an autofilter (as an example) on a worksheet?
What I want to do, is to look at only certain sets of information

while
I
am
using my form.

Example:
I am calling people, nationwide. I might want to set it where I am

only
seeing people in MY timezone, that I have not talked to yet.

Columns that I would create an autofilter on would be timezone and

call
results
Here is a filter that works while in the spreadsheet:
Sub TimeZoneVoiceDrop()
'
' TimeZoneVoiceDrop Macro
' Macro recorded 8/5/2003 by Bruce
'

'
Selection.AutoFilter
ActiveWindow.ScrollColumn = 61
ActiveWindow.ScrollColumn = 56
ActiveWindow.ScrollColumn = 54
ActiveWindow.ScrollColumn = 53
ActiveWindow.ScrollColumn = 51
ActiveWindow.ScrollColumn = 50
ActiveWindow.ScrollColumn = 48
ActiveWindow.ScrollColumn = 47
ActiveWindow.ScrollColumn = 46
ActiveWindow.ScrollColumn = 45
ActiveWindow.ScrollColumn = 44
ActiveWindow.ScrollColumn = 43
ActiveWindow.ScrollColumn = 42
ActiveWindow.ScrollColumn = 41
ActiveWindow.ScrollColumn = 39
ActiveWindow.ScrollColumn = 38
ActiveWindow.ScrollColumn = 36
ActiveWindow.ScrollColumn = 35
ActiveWindow.ScrollColumn = 32
ActiveWindow.ScrollColumn = 31
ActiveWindow.ScrollColumn = 29
ActiveWindow.ScrollColumn = 28
ActiveWindow.ScrollColumn = 27
ActiveWindow.ScrollColumn = 25
ActiveWindow.ScrollColumn = 24
ActiveWindow.ScrollColumn = 23
ActiveWindow.ScrollColumn = 22
ActiveWindow.ScrollColumn = 21
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 16
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 14
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 3
Selection.AutoFilter Field:=7, Criteria1:="0"
Selection.AutoFilter Field:=10, Criteria1:="Voice Drop"
End Sub

And it only shows 13 records with my current data set.
However, when I launch my userform, it show ALL records. It does not

pay
attention to any filters I have in place. I have tried to assign the
filtermacro to a user button, but that did not help either....

I hope this is clearer than mud...

Bruce



"Tom Ogilvy" wrote in message
...
http://www.microsoft.com/ExcelDev/Articles/sxs11pt1.htm
Lesson 11: Creating a Custom Form
Excerpted from Microsoft® Excel 97 Visual Basic® Step by Step.

http://support.microsoft.com/default.aspx?kbid=161514
XL97: How to Use a UserForm for Entering Data

http://support.microsoft.com/default.aspx?kbid=213749
XL2000: How to Use a UserForm for Entering Data


What you mean by filter is not very clear. Are you trying to

filter
information shown in a listbox on the form or use the form to get
setttings
for an autofilter (as an example) on a worksheet?

Regards,
Tom Ogilvy



"Bruccce" wrote in message
news:uJRXa.72449$YN5.55027@sccrnsc01...
I am trying to create a userform that I can set filters in. I am
looking
for
how to do this.

I have tried creating a macro that sets the filter I want, and

put
it
in
the
userform, and assigned this to a button, but userform does not

seem
to
recognize the filter. It still shows every record. What am I

doing
wrong

Where can I find this info? (I have several books, but I can not

find
this
combination covered....)

I have had somebody create a userform for me, but I need to

change
the
filter, and I need to change a lot of other items about the

form,
so
I
want
to basically start from scratch.

I would like to LEARN how to do this so I can maintain my own

code.

thanks
Bruce














  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Repost: Looking for info on how to program a userform to use filters

Using selection would be problematic, if the selection isn't in the data
that is to be filtered.

You can correct this by directly refering to the datatable rather than using
selection.

Assume your data table is in A1:Z50


Private Sub Commandbutton1_Click()
Dim rng as Range
if Activesheet.AutofilterMode then
set rng = Activesheet.AutoFilter.Range
Else
set rng = Range("A1").CurrentRegion
End if
rng.AutoFilter Field:=7, Criteria1:="0"
rng.AutoFilter Field:=10, Criteria1:="Voice Drop"
End Sub

--
Regards,
Tom Ogilvy


"Bruccce" wrote in message
news:d18Ya.80228$o%2.35978@sccrnsc02...
On my userform, I have a next/prev button, and when I use these, it goes

to
the next record that is in the worksheet, not the "filter" set

Bruce

"Tom Ogilvy" wrote in message
...
Code works on the active sheet - not sure what you mean by navigation.

Regards,
Tom Ogilvy

"Bruccce" wrote in message
news:yR_Xa.50867$cF.18912@rwcrnsc53...
Tom,

This, in concept, is what I thought should work. but when I try it,

ALL
records are still shown.
Could this possibly be be cause of my navigation, loading of the

userform?

Bruce

"Tom Ogilvy" wrote in message
...
Private Sub Commandbutton1_Click()
if Activesheet.AutofilterMode then
Activesheet.AutoFilter.Range.Select
Else
Range("A1").CurrentRegion.Select
End if
Selection.AutoFilter Field:=7, Criteria1:="0"
Selection.AutoFilter Field:=10, Criteria1:="Voice Drop"
End Sub

Regards,
Tom Ogilvy


Bruccce wrote in message
news:_cUXa.71967$Ho3.9474@sccrnsc03...
What you mean by filter is not very clear. Are you trying to
filter
information shown in a listbox on the form or use the form to get
setttings
for an autofilter (as an example) on a worksheet?
What I want to do, is to look at only certain sets of information

while
I
am
using my form.

Example:
I am calling people, nationwide. I might want to set it where I am

only
seeing people in MY timezone, that I have not talked to yet.

Columns that I would create an autofilter on would be timezone and

call
results
Here is a filter that works while in the spreadsheet:
Sub TimeZoneVoiceDrop()
'
' TimeZoneVoiceDrop Macro
' Macro recorded 8/5/2003 by Bruce
'

'
Selection.AutoFilter
ActiveWindow.ScrollColumn = 61
ActiveWindow.ScrollColumn = 56
ActiveWindow.ScrollColumn = 54
ActiveWindow.ScrollColumn = 53
ActiveWindow.ScrollColumn = 51
ActiveWindow.ScrollColumn = 50
ActiveWindow.ScrollColumn = 48
ActiveWindow.ScrollColumn = 47
ActiveWindow.ScrollColumn = 46
ActiveWindow.ScrollColumn = 45
ActiveWindow.ScrollColumn = 44
ActiveWindow.ScrollColumn = 43
ActiveWindow.ScrollColumn = 42
ActiveWindow.ScrollColumn = 41
ActiveWindow.ScrollColumn = 39
ActiveWindow.ScrollColumn = 38
ActiveWindow.ScrollColumn = 36
ActiveWindow.ScrollColumn = 35
ActiveWindow.ScrollColumn = 32
ActiveWindow.ScrollColumn = 31
ActiveWindow.ScrollColumn = 29
ActiveWindow.ScrollColumn = 28
ActiveWindow.ScrollColumn = 27
ActiveWindow.ScrollColumn = 25
ActiveWindow.ScrollColumn = 24
ActiveWindow.ScrollColumn = 23
ActiveWindow.ScrollColumn = 22
ActiveWindow.ScrollColumn = 21
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 16
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 14
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 3
Selection.AutoFilter Field:=7, Criteria1:="0"
Selection.AutoFilter Field:=10, Criteria1:="Voice Drop"
End Sub

And it only shows 13 records with my current data set.
However, when I launch my userform, it show ALL records. It does

not
pay
attention to any filters I have in place. I have tried to assign

the
filtermacro to a user button, but that did not help either....

I hope this is clearer than mud...

Bruce



"Tom Ogilvy" wrote in message
...
http://www.microsoft.com/ExcelDev/Articles/sxs11pt1.htm
Lesson 11: Creating a Custom Form
Excerpted from Microsoft® Excel 97 Visual Basic® Step by Step.

http://support.microsoft.com/default.aspx?kbid=161514
XL97: How to Use a UserForm for Entering Data

http://support.microsoft.com/default.aspx?kbid=213749
XL2000: How to Use a UserForm for Entering Data


What you mean by filter is not very clear. Are you trying to

filter
information shown in a listbox on the form or use the form to

get
setttings
for an autofilter (as an example) on a worksheet?

Regards,
Tom Ogilvy



"Bruccce" wrote in message
news:uJRXa.72449$YN5.55027@sccrnsc01...
I am trying to create a userform that I can set filters in. I

am
looking
for
how to do this.

I have tried creating a macro that sets the filter I want, and

put
it
in
the
userform, and assigned this to a button, but userform does

not
seem
to
recognize the filter. It still shows every record. What am I

doing
wrong

Where can I find this info? (I have several books, but I can

not
find
this
combination covered....)

I have had somebody create a userform for me, but I need to

change
the
filter, and I need to change a lot of other items about the

form,
so
I
want
to basically start from scratch.

I would like to LEARN how to do this so I can maintain my own

code.

thanks
Bruce
















  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Repost: Looking for info on how to program a userform to use filters

Tom,

Please bear with my ignorance...
What is a datatable and what is a selection?
How can I tell which is which?
I just have not been able to get the full grasp of the VB language! I have
done a LOT of programming in dbase etc SO MUCH DIFFERENT!

Thanks,
Bruce



"Tom Ogilvy" wrote in message
...
Using selection would be problematic, if the selection isn't in the data
that is to be filtered.

You can correct this by directly refering to the datatable rather than

using
selection.

Assume your data table is in A1:Z50


Private Sub Commandbutton1_Click()
Dim rng as Range
if Activesheet.AutofilterMode then
set rng = Activesheet.AutoFilter.Range
Else
set rng = Range("A1").CurrentRegion
End if
rng.AutoFilter Field:=7, Criteria1:="0"
rng.AutoFilter Field:=10, Criteria1:="Voice Drop"
End Sub

--
Regards,
Tom Ogilvy


"Bruccce" wrote in message
news:d18Ya.80228$o%2.35978@sccrnsc02...
On my userform, I have a next/prev button, and when I use these, it goes

to
the next record that is in the worksheet, not the "filter" set

Bruce

"Tom Ogilvy" wrote in message
...
Code works on the active sheet - not sure what you mean by navigation.

Regards,
Tom Ogilvy

"Bruccce" wrote in message
news:yR_Xa.50867$cF.18912@rwcrnsc53...
Tom,

This, in concept, is what I thought should work. but when I try it,

ALL
records are still shown.
Could this possibly be be cause of my navigation, loading of the

userform?

Bruce

"Tom Ogilvy" wrote in message
...
Private Sub Commandbutton1_Click()
if Activesheet.AutofilterMode then
Activesheet.AutoFilter.Range.Select
Else
Range("A1").CurrentRegion.Select
End if
Selection.AutoFilter Field:=7, Criteria1:="0"
Selection.AutoFilter Field:=10, Criteria1:="Voice Drop"
End Sub

Regards,
Tom Ogilvy


Bruccce wrote in message
news:_cUXa.71967$Ho3.9474@sccrnsc03...
What you mean by filter is not very clear. Are you trying

to
filter
information shown in a listbox on the form or use the form to

get
setttings
for an autofilter (as an example) on a worksheet?
What I want to do, is to look at only certain sets of

information
while
I
am
using my form.

Example:
I am calling people, nationwide. I might want to set it where I

am
only
seeing people in MY timezone, that I have not talked to yet.

Columns that I would create an autofilter on would be timezone

and
call
results
Here is a filter that works while in the spreadsheet:
Sub TimeZoneVoiceDrop()
'
' TimeZoneVoiceDrop Macro
' Macro recorded 8/5/2003 by Bruce
'

'
Selection.AutoFilter
ActiveWindow.ScrollColumn = 61
ActiveWindow.ScrollColumn = 56
ActiveWindow.ScrollColumn = 54
ActiveWindow.ScrollColumn = 53
ActiveWindow.ScrollColumn = 51
ActiveWindow.ScrollColumn = 50
ActiveWindow.ScrollColumn = 48
ActiveWindow.ScrollColumn = 47
ActiveWindow.ScrollColumn = 46
ActiveWindow.ScrollColumn = 45
ActiveWindow.ScrollColumn = 44
ActiveWindow.ScrollColumn = 43
ActiveWindow.ScrollColumn = 42
ActiveWindow.ScrollColumn = 41
ActiveWindow.ScrollColumn = 39
ActiveWindow.ScrollColumn = 38
ActiveWindow.ScrollColumn = 36
ActiveWindow.ScrollColumn = 35
ActiveWindow.ScrollColumn = 32
ActiveWindow.ScrollColumn = 31
ActiveWindow.ScrollColumn = 29
ActiveWindow.ScrollColumn = 28
ActiveWindow.ScrollColumn = 27
ActiveWindow.ScrollColumn = 25
ActiveWindow.ScrollColumn = 24
ActiveWindow.ScrollColumn = 23
ActiveWindow.ScrollColumn = 22
ActiveWindow.ScrollColumn = 21
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 16
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 14
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 3
Selection.AutoFilter Field:=7, Criteria1:="0"
Selection.AutoFilter Field:=10, Criteria1:="Voice Drop"
End Sub

And it only shows 13 records with my current data set.
However, when I launch my userform, it show ALL records. It does

not
pay
attention to any filters I have in place. I have tried to assign

the
filtermacro to a user button, but that did not help either....

I hope this is clearer than mud...

Bruce



"Tom Ogilvy" wrote in message
...
http://www.microsoft.com/ExcelDev/Articles/sxs11pt1.htm
Lesson 11: Creating a Custom Form
Excerpted from Microsoft® Excel 97 Visual Basic® Step by Step.

http://support.microsoft.com/default.aspx?kbid=161514
XL97: How to Use a UserForm for Entering Data

http://support.microsoft.com/default.aspx?kbid=213749
XL2000: How to Use a UserForm for Entering Data


What you mean by filter is not very clear. Are you trying to

filter
information shown in a listbox on the form or use the form to

get
setttings
for an autofilter (as an example) on a worksheet?

Regards,
Tom Ogilvy



"Bruccce" wrote in message
news:uJRXa.72449$YN5.55027@sccrnsc01...
I am trying to create a userform that I can set filters in.

I
am
looking
for
how to do this.

I have tried creating a macro that sets the filter I want,

and
put
it
in
the
userform, and assigned this to a button, but userform does

not
seem
to
recognize the filter. It still shows every record. What am I

doing
wrong

Where can I find this info? (I have several books, but I can

not
find
this
combination covered....)

I have had somebody create a userform for me, but I need to

change
the
filter, and I need to change a lot of other items about the

form,
so
I
want
to basically start from scratch.

I would like to LEARN how to do this so I can maintain my

own
code.

thanks
Bruce


















  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Repost: Looking for info on how to program a userform to use filters

Tom, what I am looking for, is basically a userform with the button
functions similair to what you can create with "Forms" off of the data menu.
I also need more functionality (most of the unique stuff, I already have
gotten to work - dialer, email, etc...) but what I consider to be the BASIC
stuff, I have not been able to get to work correctly together...

I hope this helps a little.


Bruce



"Bruccce" wrote in message
news:R0cYa.81086$Ho3.11387@sccrnsc03...
Tom,

Please bear with my ignorance...
What is a datatable and what is a selection?
How can I tell which is which?
I just have not been able to get the full grasp of the VB language! I have
done a LOT of programming in dbase etc SO MUCH DIFFERENT!

Thanks,
Bruce



"Tom Ogilvy" wrote in message
...
Using selection would be problematic, if the selection isn't in the data
that is to be filtered.

You can correct this by directly refering to the datatable rather than

using
selection.

Assume your data table is in A1:Z50


Private Sub Commandbutton1_Click()
Dim rng as Range
if Activesheet.AutofilterMode then
set rng = Activesheet.AutoFilter.Range
Else
set rng = Range("A1").CurrentRegion
End if
rng.AutoFilter Field:=7, Criteria1:="0"
rng.AutoFilter Field:=10, Criteria1:="Voice Drop"
End Sub

--
Regards,
Tom Ogilvy


"Bruccce" wrote in message
news:d18Ya.80228$o%2.35978@sccrnsc02...
On my userform, I have a next/prev button, and when I use these, it

goes
to
the next record that is in the worksheet, not the "filter" set

Bruce

"Tom Ogilvy" wrote in message
...
Code works on the active sheet - not sure what you mean by

navigation.

Regards,
Tom Ogilvy

"Bruccce" wrote in message
news:yR_Xa.50867$cF.18912@rwcrnsc53...
Tom,

This, in concept, is what I thought should work. but when I try

it,
ALL
records are still shown.
Could this possibly be be cause of my navigation, loading of the
userform?

Bruce

"Tom Ogilvy" wrote in message
...
Private Sub Commandbutton1_Click()
if Activesheet.AutofilterMode then
Activesheet.AutoFilter.Range.Select
Else
Range("A1").CurrentRegion.Select
End if
Selection.AutoFilter Field:=7, Criteria1:="0"
Selection.AutoFilter Field:=10, Criteria1:="Voice Drop"
End Sub

Regards,
Tom Ogilvy


Bruccce wrote in message
news:_cUXa.71967$Ho3.9474@sccrnsc03...
What you mean by filter is not very clear. Are you

trying
to
filter
information shown in a listbox on the form or use the form to

get
setttings
for an autofilter (as an example) on a worksheet?
What I want to do, is to look at only certain sets of

information
while
I
am
using my form.

Example:
I am calling people, nationwide. I might want to set it where

I
am
only
seeing people in MY timezone, that I have not talked to yet.

Columns that I would create an autofilter on would be timezone

and
call
results
Here is a filter that works while in the spreadsheet:
Sub TimeZoneVoiceDrop()
'
' TimeZoneVoiceDrop Macro
' Macro recorded 8/5/2003 by Bruce
'

'
Selection.AutoFilter
ActiveWindow.ScrollColumn = 61
ActiveWindow.ScrollColumn = 56
ActiveWindow.ScrollColumn = 54
ActiveWindow.ScrollColumn = 53
ActiveWindow.ScrollColumn = 51
ActiveWindow.ScrollColumn = 50
ActiveWindow.ScrollColumn = 48
ActiveWindow.ScrollColumn = 47
ActiveWindow.ScrollColumn = 46
ActiveWindow.ScrollColumn = 45
ActiveWindow.ScrollColumn = 44
ActiveWindow.ScrollColumn = 43
ActiveWindow.ScrollColumn = 42
ActiveWindow.ScrollColumn = 41
ActiveWindow.ScrollColumn = 39
ActiveWindow.ScrollColumn = 38
ActiveWindow.ScrollColumn = 36
ActiveWindow.ScrollColumn = 35
ActiveWindow.ScrollColumn = 32
ActiveWindow.ScrollColumn = 31
ActiveWindow.ScrollColumn = 29
ActiveWindow.ScrollColumn = 28
ActiveWindow.ScrollColumn = 27
ActiveWindow.ScrollColumn = 25
ActiveWindow.ScrollColumn = 24
ActiveWindow.ScrollColumn = 23
ActiveWindow.ScrollColumn = 22
ActiveWindow.ScrollColumn = 21
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 16
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 14
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 3
Selection.AutoFilter Field:=7, Criteria1:="0"
Selection.AutoFilter Field:=10, Criteria1:="Voice Drop"
End Sub

And it only shows 13 records with my current data set.
However, when I launch my userform, it show ALL records. It

does
not
pay
attention to any filters I have in place. I have tried to

assign
the
filtermacro to a user button, but that did not help either....

I hope this is clearer than mud...

Bruce



"Tom Ogilvy" wrote in message
...
http://www.microsoft.com/ExcelDev/Articles/sxs11pt1.htm
Lesson 11: Creating a Custom Form
Excerpted from Microsoft® Excel 97 Visual Basic® Step by

Step.

http://support.microsoft.com/default.aspx?kbid=161514
XL97: How to Use a UserForm for Entering Data

http://support.microsoft.com/default.aspx?kbid=213749
XL2000: How to Use a UserForm for Entering Data


What you mean by filter is not very clear. Are you trying

to
filter
information shown in a listbox on the form or use the form

to
get
setttings
for an autofilter (as an example) on a worksheet?

Regards,
Tom Ogilvy



"Bruccce" wrote in message
news:uJRXa.72449$YN5.55027@sccrnsc01...
I am trying to create a userform that I can set filters

in.
I
am
looking
for
how to do this.

I have tried creating a macro that sets the filter I want,

and
put
it
in
the
userform, and assigned this to a button, but userform

does
not
seem
to
recognize the filter. It still shows every record. What am

I
doing
wrong

Where can I find this info? (I have several books, but I

can
not
find
this
combination covered....)

I have had somebody create a userform for me, but I need

to
change
the
filter, and I need to change a lot of other items about

the
form,
so
I
want
to basically start from scratch.

I would like to LEARN how to do this so I can maintain my

own
code.

thanks
Bruce




















  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Repost: Looking for info on how to program a userform to use filters

Here is some background reading:

http://www.microsoft.com/ExcelDev/Articles/sxs11pt1.htm
Lesson 11: Creating a Custom Form
Excerpted from Microsoft® Excel 97 Visual Basic® Step by Step.

http://support.microsoft.com/default.aspx?kbid=161514
XL97: How to Use a UserForm for Entering Data

http://support.microsoft.com/default.aspx?kbid=213749
XL2000: How to Use a UserForm for Entering Data

http://support.microsoft.com/?id=168067
XL97: WE1163: "Visual Basic Examples for Controlling UserForms"

--
Regards,
Tom Ogilvy



Bruccce wrote in message
news:BqcYa.81483$uu5.8747@sccrnsc04...
Tom, what I am looking for, is basically a userform with the button
functions similair to what you can create with "Forms" off of the data

menu.
I also need more functionality (most of the unique stuff, I already have
gotten to work - dialer, email, etc...) but what I consider to be the

BASIC
stuff, I have not been able to get to work correctly together...

I hope this helps a little.


Bruce



"Bruccce" wrote in message
news:R0cYa.81086$Ho3.11387@sccrnsc03...
Tom,

Please bear with my ignorance...
What is a datatable and what is a selection?
How can I tell which is which?
I just have not been able to get the full grasp of the VB language! I

have
done a LOT of programming in dbase etc SO MUCH DIFFERENT!

Thanks,
Bruce



"Tom Ogilvy" wrote in message
...
Using selection would be problematic, if the selection isn't in the

data
that is to be filtered.

You can correct this by directly refering to the datatable rather than

using
selection.

Assume your data table is in A1:Z50


Private Sub Commandbutton1_Click()
Dim rng as Range
if Activesheet.AutofilterMode then
set rng = Activesheet.AutoFilter.Range
Else
set rng = Range("A1").CurrentRegion
End if
rng.AutoFilter Field:=7, Criteria1:="0"
rng.AutoFilter Field:=10, Criteria1:="Voice Drop"
End Sub

--
Regards,
Tom Ogilvy


"Bruccce" wrote in message
news:d18Ya.80228$o%2.35978@sccrnsc02...
On my userform, I have a next/prev button, and when I use these, it

goes
to
the next record that is in the worksheet, not the "filter" set

Bruce

"Tom Ogilvy" wrote in message
...
Code works on the active sheet - not sure what you mean by

navigation.

Regards,
Tom Ogilvy

"Bruccce" wrote in message
news:yR_Xa.50867$cF.18912@rwcrnsc53...
Tom,

This, in concept, is what I thought should work. but when I try

it,
ALL
records are still shown.
Could this possibly be be cause of my navigation, loading of the
userform?

Bruce

"Tom Ogilvy" wrote in message
...
Private Sub Commandbutton1_Click()
if Activesheet.AutofilterMode then
Activesheet.AutoFilter.Range.Select
Else
Range("A1").CurrentRegion.Select
End if
Selection.AutoFilter Field:=7, Criteria1:="0"
Selection.AutoFilter Field:=10, Criteria1:="Voice Drop"
End Sub

Regards,
Tom Ogilvy


Bruccce wrote in message
news:_cUXa.71967$Ho3.9474@sccrnsc03...
What you mean by filter is not very clear. Are you

trying
to
filter
information shown in a listbox on the form or use the form

to
get
setttings
for an autofilter (as an example) on a worksheet?
What I want to do, is to look at only certain sets of

information
while
I
am
using my form.

Example:
I am calling people, nationwide. I might want to set it

where
I
am
only
seeing people in MY timezone, that I have not talked to yet.

Columns that I would create an autofilter on would be

timezone
and
call
results
Here is a filter that works while in the spreadsheet:
Sub TimeZoneVoiceDrop()
'
' TimeZoneVoiceDrop Macro
' Macro recorded 8/5/2003 by Bruce
'

'
Selection.AutoFilter
ActiveWindow.ScrollColumn = 61
ActiveWindow.ScrollColumn = 56
ActiveWindow.ScrollColumn = 54
ActiveWindow.ScrollColumn = 53
ActiveWindow.ScrollColumn = 51
ActiveWindow.ScrollColumn = 50
ActiveWindow.ScrollColumn = 48
ActiveWindow.ScrollColumn = 47
ActiveWindow.ScrollColumn = 46
ActiveWindow.ScrollColumn = 45
ActiveWindow.ScrollColumn = 44
ActiveWindow.ScrollColumn = 43
ActiveWindow.ScrollColumn = 42
ActiveWindow.ScrollColumn = 41
ActiveWindow.ScrollColumn = 39
ActiveWindow.ScrollColumn = 38
ActiveWindow.ScrollColumn = 36
ActiveWindow.ScrollColumn = 35
ActiveWindow.ScrollColumn = 32
ActiveWindow.ScrollColumn = 31
ActiveWindow.ScrollColumn = 29
ActiveWindow.ScrollColumn = 28
ActiveWindow.ScrollColumn = 27
ActiveWindow.ScrollColumn = 25
ActiveWindow.ScrollColumn = 24
ActiveWindow.ScrollColumn = 23
ActiveWindow.ScrollColumn = 22
ActiveWindow.ScrollColumn = 21
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 16
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 14
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 3
Selection.AutoFilter Field:=7, Criteria1:="0"
Selection.AutoFilter Field:=10, Criteria1:="Voice Drop"
End Sub

And it only shows 13 records with my current data set.
However, when I launch my userform, it show ALL records. It

does
not
pay
attention to any filters I have in place. I have tried to

assign
the
filtermacro to a user button, but that did not help

either....

I hope this is clearer than mud...

Bruce



"Tom Ogilvy" wrote in message
...
http://www.microsoft.com/ExcelDev/Articles/sxs11pt1.htm
Lesson 11: Creating a Custom Form
Excerpted from Microsoft® Excel 97 Visual Basic® Step by

Step.

http://support.microsoft.com/default.aspx?kbid=161514
XL97: How to Use a UserForm for Entering Data

http://support.microsoft.com/default.aspx?kbid=213749
XL2000: How to Use a UserForm for Entering Data


What you mean by filter is not very clear. Are you trying

to
filter
information shown in a listbox on the form or use the form

to
get
setttings
for an autofilter (as an example) on a worksheet?

Regards,
Tom Ogilvy



"Bruccce" wrote in message
news:uJRXa.72449$YN5.55027@sccrnsc01...
I am trying to create a userform that I can set filters

in.
I
am
looking
for
how to do this.

I have tried creating a macro that sets the filter I

want,
and
put
it
in
the
userform, and assigned this to a button, but userform

does
not
seem
to
recognize the filter. It still shows every record. What

am
I
doing
wrong

Where can I find this info? (I have several books, but I

can
not
find
this
combination covered....)

I have had somebody create a userform for me, but I need

to
change
the
filter, and I need to change a lot of other items about

the
form,
so
I
want
to basically start from scratch.

I would like to LEARN how to do this so I can maintain

my
own
code.

thanks
Bruce






















Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need a Drop Tab that when selected, auto filters info to a cell!!! Randy L Excel Discussion (Misc queries) 0 November 29th 06 08:27 PM
Need a Drop Tab that when selected auto filters info to a cell!!! Armando Excel Discussion (Misc queries) 0 November 29th 06 08:17 PM
Repost with Additional Info Sandy Excel Discussion (Misc queries) 1 September 15th 05 02:06 PM
Filters freezing program Kile Excel Discussion (Misc queries) 1 July 7th 05 09:59 PM
REPOST: showing a userform boris Excel Programming 2 August 6th 03 02:30 AM


All times are GMT +1. The time now is 11:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"