Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Guys
i have 200 learner with their details. A1:USername B1: Access Date C1:Time D1:Period i want to Create UserForm because end-user wants it. and i would lik to use TextBox to Autofilter by Username. when end-user enters username; all username details shoudl b filtered. i wish u guys can help me i just need VB Codes. thank -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub Macro1()
Dim rng as Range if Activesheet.AutoFilterMode then Activesheet.AutofilterMode = False End If Set rng = Range("A1").CurrentRegion rng.AutoFilter Field:=1, Criteria1:=Userform1.Textbox1 End Sub -- Regards, Tom Ogilvy "salihyil " wrote in message ... Hi Guys i have 200 learner with their details. A1:USername B1: Access Date C1:Time D1:Period i want to Create UserForm because end-user wants it. and i would like to use TextBox to Autofilter by Username. when end-user enters username; all username details shoudl be filtered. i wish u guys can help me i just need VB Codes. thanks --- Message posted from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dear Tom Ogilvy
i have tried the function u have sent me. i have been trying it for 3 min but i could not do it. i m little bit novice. can u explain little bit more. i sorry fo taking ur time. do i need to link text box to cell A1? if u have time can u explain littbit mmore Thank -- Message posted from http://www.ExcelForum.com |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I had my data on Sheet2, starting with the headers in A1, data below (no
blank rows). I created a userform with a two textboxes and a command button. I put this code in the userform module: Private Sub TextBox1_AfterUpdate() Dim rng As Range With Worksheets("Sheet2") If .AutoFilterMode Then .AutoFilterMode = False End If Set rng = .Range("A1").CurrentRegion rng.AutoFilter Field:=1, Criteria1:=UserForm1.TextBox1 End With End Sub I displayed the userform and put in a value that matched a value in column 1 of the data into Textbox1 and tabbed to the next control. The date was filtered to display only rows that contained that value in column 1. Change references like Userform1, Textbox1 and Sheet2 (and range A1) to match you configuration/controls/sheets/layout. -- Regards, Tom Ogilvy "salihyil " wrote in message ... Dear Tom Ogilvy i have tried the function u have sent me. i have been trying it for 30 min but i could not do it. i m little bit novice. can u explain little bit more. i sorry for taking ur time. do i need to link text box to cell A1? if u have time can u explain littbit mmore Thank u --- Message posted from http://www.ExcelForum.com/ |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks boss (Tom Ogilvy)
It is Working Fine Thanks for ur time Take care best wishes;) ;) ;) :) :) :) --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
excel 2007 autofilter change to 2003 autofilter functionality? | Excel Discussion (Misc queries) | |||
2007 excel autofilter change back to 2003 autofilter? | Excel Discussion (Misc queries) | |||
Calculate Textbox value based on another textbox value.doc | Excel Discussion (Misc queries) | |||
Calculate Textbox value based on another textbox value | Excel Discussion (Misc queries) | |||
UserForm TextBox to ActiveSheet TextBox over 256 characters | Excel Programming |