Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Msg Box

Status
Not open for further replies.

cbanks

Technical User
Jun 27, 2006
27
US
Im filtering a selection and I want to insert a msg box to allow the user to work on the spreadsheet once the msg box pops up. Therefore they can make changes then click ok to let the macro continue. How would i do that? Right now its not allowing me to edit. Thanks.
Code:
Dim lRow5 As Long, rngTarget5 As Range
   With Worksheets("Sales Breakdown")
        lRow5 = .Cells(.Rows.Count, 20).End(xlUp).Row
        Set rngTarget5 = .Range("A1:AA" & lRow5)
        With rngTarget5
            .AutoFilter Field:=20, Criteria1:="New"
        End With

Msg Box "Please Copy and Paste New Information and Click Ok"
 
you cannot do this with a standard messagebox - you must use a windows api to achieve this.

An easier solution is to use a very simple UserForm that just displays a message. You can set this form as 'modal' which will allow users to do as you desire.

To pop up the form use

FormName.Show

then you can have code attached to the 'ok' button that closes the form with:

FormName.hide

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
See your other thread for a possible solution.

-----------
Regards,
Zack Barresse
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top