![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: May 2002
Location: Ipswich, Suffolk, England
Posts: 135
|
I have the following code
Dim Message, Title, Default, MyValue Range("c6:g17").Select Selection.Clear Call boarders Do Message = "Please enter type of expenditure" Title = "Please enter type of expenditure" Default = "" Range("f4") = InputBox(Message, Title, Default) MyValue = Range("containing2") Sheets("Edited Iprocurement lookup").Select Selection.AutoFilter field:=2, Criteria1:="*", Operator:=xlAnd Selection.AutoFilter field:=3, Criteria1:="*", Operator:=xlAnd Selection.AutoFilter field:=2, Criteria1:=MyValue, Operator:=xlAnd Range("A1:B66").Select Selection.Copy Sheets("User requested").Select Range("C5").Select ActiveSheet.Paste Call boarders If Range("c6") = "" Then If MsgBox("You have entered an incorrect description, do you want to continue?", vbRetryCancel + vbQuestion) = vbRetry Then Range("c6") = "" Else Range("C6") = "Quit By User" End If Else End If Loop Until Range("c6") <> "" Range("C6:D18").Select Selection.Sort Key1:=Range("D6"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom Range("C5").Select Is it possible to stop the screen from flicking from the sheet user requested to Iprocurment edited ? Thanks in advance |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
Try adding these two lines...
Tom _________________ Found a solution? If so, please post again so members of this board can spend their time helping others. Better still, edit your topic(intitial post), by tagging on a word or phrase such as, "Problem Solved", or "Resolved". Thanks for being courteous! [ This Message was edited by: TsTom on 2002-05-10 00:01 ] |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: May 2002
Location: Ipswich, Suffolk, England
Posts: 135
|
thanks, it worked great
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|