Userform help needed to replace current one with a newer one

DeezNuts

Board Regular
Joined
Aug 12, 2014
Messages
177
I currently have one built with the macro that control true or false output but want to customize it a bit and cant see how current piece of code for the form is

Code:
    If MsgBox("Do you want to sort grades ascending or descending?" & vbCrLf & vbCrLf & "Click [Yes] for ascending" & vbCrLf & "Click [No] for descending", vbYesNo, "Sort by?") = vbYes Then
        sortAscending = True
    Else
        sortAscending = False
    End If
<code></code>

How would I go about making it look like this
LtilKM2.png


With the output of true or false to control the macro.


Also instead of a short cut key is there a way to add a button or link to a sheet to activate the macro popup?
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
DeezNuts:

Were you able to get this to work with a Userform? If yes show me how you did this. Show me the code in the Userform and the module please.
 
Upvote 0
I will put together a file and upload it for you. I went a slightly different route using 6 arrow buttons so I can sort any one of three columns instead of just the one.
 
Upvote 0
That looks great. In case you do not know you can also assign a macro to run if you click on a particular cell. Or you can choose to run a macro from a list of macros from a dropdown list on your worksheet. If you want to know how to do this let me know. This will keep from having six shapes or buttons on your sheet.</SPAN>
 
Upvote 0
That looks really great. Your buttons look good like that. I think we have all learned a few things here.
 
Upvote 0

Forum statistics

Threads
1,215,456
Messages
6,124,939
Members
449,197
Latest member
k_bs

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top