Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default visual basic prompt data entry

How can I get visual basic to prompt the user for a data entry that will
subsequently be used in an autofilter.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,533
Default visual basic prompt data entry

You use an inputbox statement.

Sub aa()
Dim Answer As String
answer = InputBox("Enter Criteria", "Filter input")
Selection.AutoFilter Field:=1, Criteria:=answer
End Sub

Hopes this helps.

---
Per

"BG Mark" skrev i meddelelsen
...
How can I get visual basic to prompt the user for a data entry that will
subsequently be used in an autofilter.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default visual basic prompt data entry

Dim myStr as string
....
mystr = inputbox(Prompt:="Please enter something")
if trim(mystr) = "" then
msgbox "you didn't enter anything"
else
msgbox mystr & " was entered"
end if




BG Mark wrote:

How can I get visual basic to prompt the user for a data entry that will
subsequently be used in an autofilter.


--

Dave Peterson
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
Is Visual Basic the same as Visual Studio 2008? Mike Stewart Excel Worksheet Functions 5 January 11th 09 04:58 PM
Data filter and deleting rows in visual basic Ruben Excel Discussion (Misc queries) 0 August 24th 08 08:38 PM
Visual Basic Editor - Time and Date Entry Continued Tammy Excel Worksheet Functions 2 January 4th 08 03:49 PM
Visual Basic - copying and keeping data updated Linda Excel Discussion (Misc queries) 0 October 14th 07 06:54 PM
changing the visual basic in office 2003 to visual studio net bigdaddy3 Excel Discussion (Misc queries) 1 September 13th 05 10:57 AM


All times are GMT +1. The time now is 04:21 AM.

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

About Us

"It's about Microsoft Excel"