Results 1 to 1 of 1
10-08-2018, 03:44 PM #1
Excel Mac 2016 Showing a prompt in an InputBox
- Member Since
- Feb 16, 2010
In the process of transitioning from Excel 2011 to Excel 2016 and have discovered that I cannot show a prompt with "application.inputbox" when asking the operator to select a cell or range.
I have worked around this by putting the description in the title bar, which does not make a lot of sense. A regular input box when the operators is asked to enter something works OK but that is not what I need. the code I am using is below.
Sub SortSelCol() Dim SortRng As Range, RngKey Call LastCell If Val(Application.Version) < 15 Then Set col1 = Application.InputBox("Select 1st cell in Column to be sorted", Type:=8) Else 'It appears that one cannot provide a prompt for application.inputbox on mac so have to show prompt in title Set col1 = Application.InputBox("", Title:="Select 1st Row of Column to Sort", Type:=8) End If RngKey = col1.Column Range(Cells(col1.Row, col1.Column), Cells(LRow, col1.Column)).Select If col1.Column > 1 Then Selection.Interior.ColorIndex = 36 Set SortRng = Range(Cells(1, 1), Cells(LRow, LCol)) SortRng.Select ActiveWorkbook.Worksheets("Indexed").Sort.SortFields.Clear ActiveWorkbook.Worksheets("Indexed").Sort.SortFields.Add Key:=Range(Cells(col1.Row, col1.Column), Cells(LRow, col1.Column)), _ SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal With ActiveWorkbook.Worksheets("Indexed").Sort .SetRange Range(Cells(1, 1), Cells(LRow, LCol)) .Apply End With Cells(1, 1).Select End Sub
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
By poppi in forum macOS - Operating SystemReplies: 3Last Post: 03-30-2018, 02:11 PM
By flyboy54 in forum macOS - Apps and GamesReplies: 1Last Post: 01-08-2018, 01:19 PM
By jeremy14 in forum macOS - Apps and GamesReplies: 15Last Post: 06-09-2017, 06:39 AM
By fak119 in forum macOS - Operating SystemReplies: 8Last Post: 06-19-2016, 09:45 PM
By mrj002 in forum macOS - Apps and GamesReplies: 4Last Post: 09-14-2015, 01:16 PM