LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Userforms and autofilters - Autofilters don't seen to work with userform

I would like to have my userform display only what rows are filtered at a
given time. I would like to be able to use autofilter from normal excel
screen, and then use my userform. I would also like to be able to record one
of the autofilters and assign it to a button on my userform.

Currently, when I step through the rows with the up/down buttons on my form,
it shows each and every row.
Right now, I have 2 fields being displayed First and lastname, and then my
up/down SpinButton (and some other buttons for printing, closing ans
saving....)


What am I doing wrong?



I have the following code:

---------------------------------------
'module1

Sub GetGoing_CI()
If ActiveCell.Row = 1 Then ActiveCell.Offset(1, 0).Select
Dim jump As Variant
jump = 1 - ActiveCell.Column
ActiveCell.Offset(0, jump).Select
ActiveSheet.Range("A1").Select 'so that current region in init works
UserForm1.Show
End Sub


Sub FillMyForm1()
ContactFilterFlag = False
With UserForm1
'Assignment Col Ofs Item
' .textbox0 =ActiveCell.Offset(0, 0) ' A 0 Record_Number
..TextBox1 = ActiveCell.Offset(0, 1) ' B 1 First
..TextBox2 = ActiveCell.Offset(0, 2) ' C 2 LastName
End With

End Sub

---------------------------------------------

'Userform1

Private Sub UserForm_Initialize()
Worksheets("Contacts").Select
ws = "Contacts"
FillMyForm1
End Sub

Private Sub CommandButton1_Click()
Dim Mldg, stil, Titel, Antwort
Mldg = "Don't you want to save the database now ?"
stil = vbYesNo + vbCritical + vbDefaultButton2
Titel = "Exit Form"
Antwort = MsgBox(Mldg, stil, Titel)
If Antwort = vbYes Then
ActiveWorkbook.Save
Else
End If
Unload UserForm1
End Sub

Private Sub CommandButton2_Click()
UserForm1.PrintForm
End Sub

Private Sub CommandButton3_Click()
ActiveWorkbook.Save
End Sub

Private Sub SpinButton1_SpinDown()
ActiveCell.Offset(1, 0).Select
FillMyForm1
End Sub

Private Sub SpinButton1_SpinUp()
ActiveCell.Offset(-1, 0).Select
FillMyForm1
End Sub

Sub








 
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
AutoFilters Joli Excel Worksheet Functions 1 March 21st 06 09:14 PM
Freezing Autofilters Elcoholic Excel Worksheet Functions 0 September 23rd 05 06:38 AM
How to set up AutoFilters? MS Suzanne Excel Worksheet Functions 1 June 30th 05 03:53 AM
autofilters Diego Villaseñor Fernández Excel Worksheet Functions 0 January 13th 05 11:27 PM
Help with Userforms and filters or autofilters Bruccce Excel Programming 0 July 31st 03 04:37 PM


All times are GMT +1. The time now is 07:32 PM.

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"