Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using TextBox to AutoFilter

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Using TextBox to AutoFilter

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using TextBox to AutoFilter

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Using TextBox to AutoFilter

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using TextBox to AutoFilter

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
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
excel 2007 autofilter change to 2003 autofilter functionality? jonnybrovo815 Excel Discussion (Misc queries) 1 April 19th 10 10:05 PM
2007 excel autofilter change back to 2003 autofilter? jonnybrovo815 Excel Discussion (Misc queries) 1 April 19th 10 05:53 PM
Calculate Textbox value based on another textbox value.doc Tdungate Excel Discussion (Misc queries) 1 February 12th 09 07:11 PM
Calculate Textbox value based on another textbox value Tdungate Excel Discussion (Misc queries) 0 February 12th 09 07:03 PM
UserForm TextBox to ActiveSheet TextBox over 256 characters Dan E[_2_] Excel Programming 1 July 28th 03 07:36 PM


All times are GMT +1. The time now is 06:15 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"