TEMPCOMBO opens in double click

Hi,
https://social.msdn.microsoft.com/Forums/office/en-US/01ba96be-5801-4eda-95d9-e01cea835567/temp-combobox-doesnot-work-in-protected-sheet?forum=exceldev
'==========================
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _
  Cancel As Boolean)
Dim str As String
Dim cboTemp As OLEObject
Dim ws As Worksheet
Set ws = ActiveSheet
ScreenUpdating = False
Set cboTemp = ws.OLEObjects("TempCombo")
  On Error Resume Next
  With cboTemp
  'clear and hide the combo box
    .ListFillRange = ""
    .LinkedCell = ""
    .Visible = False
  End With
On Error GoTo errHandler
  If Target.Validation.Type = 3 Then
    'if the cell contains a data validation list
    Cancel = True
    Application.EnableEvents = False
    'get the data validation formula
    str = Target.Validation.Formula1
    str = Right(str, Len(str) - 1)
    With cboTemp
      'show the combobox with the list
      .Visible = True
      .Left = Target.Left
      .Top = Target.Top
      .Width = Target.Width + 5
      .Height = Target.Height + 5
      .ListFillRange = str
      .LinkedCell = Target.Address
    End With
    cboTemp.Activate
    'open the drop down list automatically
    Me.tempcombo.DropDown
  End If
errHandler:
  Application.EnableEvents = True
  ScreenUpdating = True
  Exit Sub
End Sub
'=========================================
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim str As String
Dim cboTemp As OLEObject
Dim ws As Worksheet
Set ws = ActiveSheet
Application.EnableEvents = False
Application.ScreenUpdating = True
If Application.CutCopyMode Then
  'allow copying and pasting on the worksheet
  GoTo errHandler
End If
Set cboTemp = ws.OLEObjects("TempCombo")
  On Error Resume Next
  With cboTemp
    .Top = 10
    .Left = 10
    .Width = 0
    .ListFillRange = ""
    .LinkedCell = ""
    .Visible = False
    .Value = ""
  End With
errHandler:
  Application.EnableEvents = True
  Exit Sub
End Sub
'====================================
'Optional code to move to next cell if Tab or Enter are pressed
'from code by Ted Lanham
'***NOTE: if KeyDown causes problems, change to KeyUp
Private Sub TempCombo_KeyDown(ByVal _
        KeyCode As MSForms.ReturnInteger, _
        ByVal Shift As Integer)
    Select Case KeyCode
        Case 9 'Tab
            ActiveCell.Offset(0, 1).Activate
        Case 13 'Enter
            ActiveCell.Offset(1, 0).Activate
        Case Else
            'do nothing
    End Select
End Sub
'===================================="
The question is , the tempcombo needs double click to open dropdown. Is it possible that it appears when mouce hover over the cell or with one click ??

Hi drsantoshsinghrathore,
I made a simple with your code, and I could reproduce your issue. Based on the code, I think this behavior is expected since the tempcombo needs double click to open dropdown in your code. And if you want to achieve it with one click, I think you could remove
the "Worksheet_BeforeDoubleClick" and modify the "Worksheet_SelectionChange".
The simple code as below:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim str As String
Dim cboTemp As OLEObject
Dim ws As Worksheet
Dim wsList As Worksheet
Set ws = ActiveSheet
Set wsList = Sheets("ValidationLists")
Set cboTemp = ws.OLEObjects("TempCombo")
On Error Resume Next
With cboTemp
.ListFillRange = ""
.LinkedCell = ""
.Visible = False
End With
On Error GoTo errHandler
If Target.Validation.Type = 3 Then
Application.EnableEvents = False
str = Target.Validation.Formula1
str = Right(str, Len(str) - 1)
With cboTemp
.Visible = True
.Left = Target.Left
.Top = Target.Top
.Width = Target.Width + 15
.Height = Target.Height + 5
.ListFillRange = str
.LinkedCell = Target.Address
End With
cboTemp.Activate
Else
With cboTemp
.Top = 10
.Left = 10
.Width = 0
.ListFillRange = ""
.LinkedCell = ""
.Visible = False
.Value = ""
End With
End If
errHandler:
Application.EnableEvents = True
Exit Sub
End Sub
Best Regards,
Edward
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.

Similar Messages

  • Trying to make a photobook but can't get pages to open by double clicking. Photos from Iphoto 9.6. Help anybody?

    Trying to make a photobook but can't get pages to open by double clicking. Photos from Iphoto 9.6. Help anybody?

    What do you mean? Are you not able to switch from "All pages" view of the book to a single page view by double-clicking a selected page? Or what is the problem?
    Or can you not open the book at all from the source list?

  • Events will not open with double click/double click not working.

    Have just upgraded to iPhoto'11 and finding it a pain to use after previous iPhoto.  Events will not open with double click (even though highlighted in yellow) and photos will not open with double click or videos play.  How can we fix this please?

    That sounds very like an issue with your mouse/trackpad and not iPhoto. Go to your SystemPreferences and chck the speed you've set for double clicking
    Regards
    TD

  • HT1689 I want to close apps running in back ground but after double clicking I dont get apps running in back ground instead photo apps open after double clicking home screen

    I want to close apps running in back ground but after double clicking I dont get apps running in back ground instead photo apps open after double clicking home screen Please help.

    iPhone 3G does not support multitasking

  • Images don't open when double clicked

    I have CS3 installed on a MacBook Pro.  Since installing Snow Leopard images will no longer open when double clicked or dragged onto the application icon.  The only way to open an image is through the open file menu.
    Any help would be greatly appreciated!!!
    Steve

    This is covered in the FAQs. Its for older systems but it just goes to show Apple still hasn't fixed it.

  • InDesign files won't open with double click

    InDesign files won't open with double click on my MacPro with Snow Leopard although they do open from external hard drives when I double click.

    Thank you very much,you were correct, it appears the mouse clicks were set too fast. Thank you very much indeed for taking the time to answer my question.
    Regards,
    Mag1975

  • Nothing will open with double click

    Help! Our iMac seems to work OK, except that nothing will open with a double-click in Finder. It is not the mouse, which works fine. I rebuilt the directory with DiskWarrior, but that did not help. What is weird is that things do open with double-click soon after you reboot it. But after a day or so, it stops working. Any ideas?
    Thanks,
    Carlos

    Hi Carlos!
    It maybe your Mouse or your Mouse Preferences are getting lost somewhere. What type of Mouse do your have? When you lose the ability to double click, can you still right click and see the menu dialog? If so, try to open your file this way, if nothing happens when you right click try the next step below...
    You should check: System Preferences > Keyboard & Mouse > Mouse... from here make sure you right (secondary) button is activated and double click speed is not too fast or slow.
    Let us know, good luck, Rick
    iMac G5 iSight 20" - 30G iPOD in Slimming Black - WD 500G FW -   Mac OS X (10.4.8)   - HP Pav 15" WS and Toshiba Sat 17" WS LP's - Canon 20D & A620 Kodak P880

  • 2013 excel won't open when double clicked

    Hello,
    I am using window's 7. I am having an issue with excel. An excel file will not open when double clicked.
    Thank you,

    Hi,
    Does this issue happen to a certain Excel file or all Excel files?
    If this only happen to a certain Excel file, where is the file stored? We may try to open a blank Excel file, and then open the certain Excel file via File > Open and then navigate to the file to see the result.
    If this issue happens to all Excel files, please go to Task Manager, click Processes tab and make sure Excel.exe is not listed there. If Excel.exe is listed, end the process and then try to opening Excel file to see the result.
    If above doesn't fix the issue, we may also try to
    run a repair of your Office installation to see the result. It seems that the method fixed a similar issue for a number of users according to another thread.
    Please have a try and let me know the result.
    Regards,
    Steve Fan
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • My Time Machine won't back up and files won't open when double clicked.

    I'm not sure if these are related, but recently my MacBook Pro has been acting much more sluggish than usual.
    To start, I have a 13in MacBook Pro Mid 2012 model with a 2.5 GHz Intel Core i5 processor and 4 GB 1600 MHz DDR3 memory. I've got it new in the summer of 2012, and haven't had any real problems until now. I have a 1TB Hitachi external hard drive with over 600GB left of storage. I'm running Yosemite.
    Lately, as in the past few weeks but more noticeably the past few days, I can't open files if I just double click on them from my desktop or from searching them outside of the application. For instance, if I click on a word document on my desktop, it will cause the work icon to bounce for a while, pretending to open, but it never does. If the application is already running, the file just won't open. If I search from the "open" selection within the application, it works fine. This is true for all of my Microsoft Office apps, Photoshop, Preview, iTunes, and everything in between, all of which I had never had a problem with before.
    Next, anytime I try to backup my system using Time Machine, it simply shows the "Preparing Backup" status and never starts. I've had the hard drive and used it as a Time Machine since I got the computer, and have had zero problems at all.
    I've tried CleanMyMac2, Memory Clean, and I've always kept my Mac very clean and organized, as in no duplicate files, moving my biggest files onto my hard drive, and deleting any of my unnecessary files.  I know I don't have a ton of RAM left, but I'm honestly not completely sure what to do about that, as this model apparently doesn't have RAM updates available.
    Think you all can help?
    Thanks so much.

    Please read this whole message before doing anything.
    This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
    Step 1
    The purpose of this step is to determine whether the problem is localized to your user account.
    Enable guest logins* and log in as Guest. Don't use the Safari-only “Guest User” login created by “Find My Mac.”
    While logged in as Guest, you won’t have access to any of your documents or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this behavior; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    *Note: If you’ve activated “Find My Mac” or FileVault, then you can’t enable the Guest account. The “Guest User” login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.
    Step 2
    The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.
    Please take this step regardless of the results of Step 1.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem. You must hold down the shift key twice: once when you turn on the computer, and again when you log in.
    Note: If FileVault is enabled in OS X 10.9 or earlier, or if a firmware password is set, or if the startup volume is a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to start up and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal startup may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem?
    After testing, restart as usual (not in safe mode) and verify that you still have the problem. Post the results of Steps 1 and 2.

  • Photoshop CS2 will not open to double click in Snow Lepard

    Since loading Snow Leopard I have been unable to open Photoshop files with a double click. Double clicking .psd file opens PS with the message "Could not complete your request because Photoshop does not recognize this type of file." Right click "open with" gets the same result. I CAN open files through the file menu in PS. But, files opened via the file menu and saved as... will not open with a double click.
    The "Open with" in the file info window reads "Adobe Photoshop CS2". Even forcing it to open in Preview and then back to PS CS2, sort of like hitting it with a hammer, does not improve the situation.
    CS2 on and year old dual quad.
    Before you knee jerk a "CS2, what did you expect..." CS2 seems to work fine once open. And I have access to another brand new iMac 24" with CS2 and Snow Leopard that does not have this problem, files open with a double click.
    On my troubled machine the thousands of files in question opened yesterday, pre Snow Leopard. I have found a few PS files that are several years old that do open to a double click.
    Thoughts?

    In a partial answer to my own question...
    I have discovered that the Adobe CS2 files (as well as Illustrator CS2, Microsoft Office X, Silo, etc.) will open with a double click in some cases.
    Files on my main hard drive (Mac pro dual quad with four one terabyte hard drives, Snow Leopard 10.6.1) is a RAID made up of two of the internal terabyte hard drives will not open with a double clip. (They do open via the file menu in the given program).
    But files on non-RAID drives open with a double click as expected.
    It appears that the RAID drive (Apple software RAID) is the culprit.
    It is likely that a simple fix from Apple in the operating system to correct the opening of files with a double click from an Apple sotware RAID drive would solve the problem as the various programs all work fine otherwise with Snow Leopard 10.6.1.

  • Wrong project opens when double clicking on a project in project view

    This is really weird. I have a personal library that was created by importing my entire iPhoto library and a Pro library that was created by just importing groups of images and folders from one of my drives. Both libraries are 100% managed. When Aperture opens, and my Personal library was the library that was open when I last closed Aperture, this behavior occurs. I go to double click on a project in project view and some other project opens. It's not random either. If I click on the project "Kennesaw Hike" for example, then "Jeremy's Birthday" will open every time.
    Now the strange thing is when I go to File, Switch To Library, and choose my Pro Library and then switch right back to my Personal library, the projects in the project view open correctly. Something else that might be related. A few times in the last week when the Personal library was the open library when Aperture was closed last, and then I open Aperture later, it would prompt for my serial number again.
    Another tidbit that might be of interest. I recently replaced the drive both libraries were on and copied them both to a new larger drive.
    Any ideas?
    Thanks

    I'd like to add a "me too" to this.

  • How can i setup pages to automatically open when double clicked.  Currently when I double click it creates cpgz file and does not open.  The only way to open pages doc is to manually ask to open with pages.

    Currently when I double click it creates cpgz file and does not open.  The only way to open pages doc is to manually ask to open with pages.

    Hi Karen,
    Sounds like OS X has lost the association between Pages and its files.
    Start by quitting Pages, then going to Finder.
    In Finder, locate a .pages file. Click on it (once), then press command-I (eye, not one) to Get Info.
    In the Info window that opens, expand the Open With section.
    In this section, click on the pop-up menu and choose Pages (even if Pages is already shown).
    Click the Change All button to associate all files with the .pages extension with Pages.
    Close the info window.
    Double click any .pages file to check that Pages will now launch and open the file.
    Regards,
    Barry

  • Message window won't open after double-clicking message in list

    When I re-launched Mail, I suddenly lost the ability to open a message by double-clicking it in the message list window. I can view the message in the preview window at the bottom of the list, but without opening the message itself, I seem to lose the ability to reply, forward, etc.
    Coincidentally, in case the problem is related, I also noticed that Safari no longer opens a window after launch. Going to "File" in the menu bar and selecting "New Window" produces nothing.
    Anyone have a clue about fixing these?

    Read the following article for general troubleshooting and cache-cleaning procedures:
    Resolving Disk, Permission, and Cache Corruption
    In particular, be sure to verify/repair the startup disk (not just permissions), and to read this as well:
    Side effects of System cache cleaning
    In addition to the utilities mentioned there for cache cleaning, you may also consider OnyX or Cache Out X, which are free.
    More specifically, this could be caused by some Launch Services cache or preferences corruption. The following article describes how to manually reset Launch Services -- the notes at the bottom of the article also provide information about the side effects of deleting each of the files involved:
    Resetting Launch Services
    And this is how you should proceed to reset Launch Services with OnyX, for example:
    1. Quit all applications.
    2. Launch OnyX and enter your administrator password.
    3. Click Maintenance. In the Reset section, check LaunchServices database.
    4. You may uncheck any other pre-checked options if you wish.
    5. Click the Execute button.
    6. Restart the computer.

  • Files unable to be opened via double click.

    Hello,
    I have a G5 mac desktop running 10.3.9 and it is in a state where when you double click a file (say a word doc), the application launches but the file doesn't open.
    I have tried force resetting the LaunchServices database with lsregister -kill -f -domain local -domain system -domain user command but with no change to the problem. Any advice would be greatly appreciated.
    thanks,
    Derek

    I have tried repairing permissions and restarting. The extra info that I have discovered is that files that reside on the local disk behave normally. It is the files that are in the user's home directory which is nfsv3 mounted from a sun server are the one's behaving oddly.

  • Premiere Pro cs5.5 will not open after double-clicking icon

    I have uninstalled and reinstalled from disk.  I double-click the icon and the opening screen begins and then closes down.  I've run windows update to make sure everything is up to date and it still will not open.  Any suggestions on what to do?

    I don't think that is a graphics adapter, that is an I/O device... from what I have read
    --Windows 7 click START and look on the right side
    --Go to Windows Control Panel from START popup
    --NOTE that I do not have Win8 so can't give instructions
    --Click Hardware and Sound and then click Device Manager
    --Click the + sign at Display Adapters
    --Right click the display adapter and select Properties
    The "usual" is some model of ATI/AMD or an nVidia adapter
    I have nVidia GTX285 with driver 296.10

Maybe you are looking for

  • How can I stop Firefox from opening a new Tab as Babylon Search?

    So I recently downloaded Babylon (for an offer), and Babylon search started to open when I open a new Tab. I've uninstalled the Babylon program and the Search Add-On, but it still keeps on opening. is there any possible way that I can fix this? I wan

  • How can I get Illustrator CS6 to update? I get Installation error code U44M1P7

    I have a windows 8.1 machine.  When I installed Design Standard CS6, I got error messages for Illustrator CS6,  Photoshop CS6 regular and Photoshop CS6 64-bit. I checked for Adobe updates, and after installing all of these, I still get an error for I

  • Price Diffrence for Clearing Charges

    Hi Expert, WE defined clearing charges 1400 @ 12000 kg material in PO and we received GR for 11930 , accordingly clearing charges credited by almost 140011930 , in between ,we consumbed almost. 1174 quantity but whenever bill passed for the same , cl

  • Asset Acquisition Report(RAZUGA_ALV01)

    In asset acquisition report(RAZUGA_ALV01), we can get the field - Ordinary Depreciation(O.dep.) after changing the report layout. While using this report, I found the value of O. dep.(NAFAB) is different from the planned ordinary depreciation (NAFAP)

  • Error when running SQL over DB2/400 database

    Folks, I'm trying to execute an SQL statement which works well on DB2/400 but doesn't like it in Java embedded SQL. The statement looks like this... select rrn(a) from BLMINTF1 a where RDTUSC = 050106 or RDTADC = 050106 or RDTBPC = 050106 or RDTCDC =