Results 1 to 6 of 6

Thread: Auto Show Drop-Down List When Selecting the Cell

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    10,457
    Rep Power
    10
    Hi,
    From your other Thread, ( https://excelfox.com/forum/showthrea...ll=1#post14871 )
    Quote Originally Posted by DocAElstein View Post
    ....I did just record a macro whilst selecting the arrow on a drop down list. Unfortunately , no coding is produced by this: Not all actions taken manually produce coding by the macro recorder. So this does not help us. ....
    I am 90% sure that we cannot automate with VBA the clicking of the arrow.
    You could possibly check by asking the question at some other places / Forums., just to be sure. I may be wrong because I have not done much with drop down validation things



    The best I can offer is a macro which will give you a message box for a few seconds to tell the person clicking the cell to select the arrow.

    This would need to go in a normal macro module
    Code:
    ' Pseudo Non Modal MsgBox, MessageBoxA API Standard Non Standard Stuff, More Fundamentally complicated UnWRap it and.. "Pseudo Non Modal MsgBox" --- A valid handle, hWnd, other than the Excel spreadsheet window ( Private Declare Function FindWndNumber Lib "user32" Alias "FindWindowA" (Optional ByVal lpClassName As String, Optional ByVal lpWindowName As String) As Long --- hWndParent = FindWndNumber(lpClassName:="XLMAIN", lpWindowName:=vbNullString) ), or even no ( Null ) hWnd results in a pseudo Non Modal MsgBox http://www.excelfox.com/forum/showthread.php/2227-VBA-Input-Pop-up-Boxes-Application-InputBox-Method-versus-VBA-InputBox-Function?p=10476#post10470 http://www.tek-tips.com/faqs.cfm?fid=4699
    Public Declare Function APIsinUserDLL_MsgBox Lib "user32.dll" Alias "MessageBoxTimeoutA" (Optional ByVal hWnd As Long, Optional ByVal Prompt As String, Optional ByVal Title As String, Optional ByVal uType As Long, Optional ByVal wLanguageID As Long, Optional ByVal Delay_ms As Long) As Long   '     https://www.excelforum.com/development-testing-forum/1215283-gimmie-da-codexamples-call-in-the-appendix-posts-2018-no-reply-needed-but-if-u.html#post4822413
    
    This would need to go in the worksheets code module
    Code:
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
        If Target.Address = "$B$3" Then
         APIsinUserDLL_MsgBox hWnd:=WndNumber, Prompt:="Please click Arrow shown on right side of the cell", Title:="NonModalPopUpThingy", Delay_ms:=2000  '
        Else
        
        End If
    End Sub
    Alan
    Attached Files Attached Files
    Last edited by DocAElstein; 09-05-2020 at 04:33 PM.
    ….If you are my competitor, I will try all I can to beat you. But if I do, I will not belittle you. I will Salute you, because without you, I am nothing.
    If you are my enemy, we will try to kick the fucking shit out of you…..
    Winston Churchill, 1939
    Save your Forum..._
    KILL A MODERATOR!!

Similar Threads

  1. Replies: 4
    Last Post: 04-25-2014, 04:23 PM
  2. A code to show colour in cell from list
    By rodneykaye in forum Excel Help
    Replies: 4
    Last Post: 10-18-2013, 03:56 PM
  3. Replies: 4
    Last Post: 07-27-2013, 01:34 PM
  4. Replies: 2
    Last Post: 07-23-2013, 06:54 PM
  5. Auto Unique List
    By r_know in forum Excel Help
    Replies: 8
    Last Post: 07-19-2012, 09:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •