Results 1 to 19 of 19

Thread: excel userform combobox dropdown position

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    excel userform combobox dropdown position

    does anyone know how to fix the position of the dropdown when excel is displayed on the second monitor?
    when excel is displayed on my second screen, with user form in center of excel application, the dropdown is always displayed at the left edge of the first monitor,
    any suggestions?
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  2. #2
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: excel userform combobox dropdown position

    Hi West

    Sorry I didn't understand your query regarding 1st screen and 2nd screen. Can you elaborate on that? or a snaphot?
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: excel userform combobox dropdown position

    like this, see the dropdown is displayed on the other screen

    oops turned out to be bit big, i will try to resize
    much better size now, but hard to read, the drop down is over the excel ide properties window, but will display over whatever is on that screen, works correctly if excel is on the other screen
    Attached Images Attached Images  
    Last edited by westconn1; Oct 22nd, 2008 at 04:03 AM.
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  4. #4
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: excel userform combobox dropdown position

    I tried hard look for the dropdown but couldn't locate it but then I managed to see what you meant

    When you say screens do you mean windows?

    One last request... can I see your workbook?
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

  5. #5

    Thread Starter
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: excel userform combobox dropdown position

    One last request... can I see your workbook?
    lol nothing in the workbook, just some code for forum testing i never save it, this is a standard problem with any workbook i use

    When you say screens do you mean windows?
    screens ....... monitors
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  6. #6
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: excel userform combobox dropdown position

    under the userform's properties check what is the value of StartUpPosition

    I guess it is "3 - WindowsDefault"

    If it is then change it to "CenterScreen"

    Try now...
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

  7. #7

    Thread Starter
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: excel userform combobox dropdown position

    the default seems to be centerowner (1), which is where the userform displays, but the problem is just the dropdown from the combobox

    if i set it to centerscreen result is the same
    if i set to windows default then works correctly, but userform is on other screen
    Last edited by westconn1; Oct 22nd, 2008 at 06:42 AM.
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  8. #8
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: excel userform combobox dropdown position

    When you say that it is on a different screen do you mean on a different computer?
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

  9. #9

    Thread Starter
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: excel userform combobox dropdown position

    When you say that it is on a different screen do you mean on a different computer?
    no same computer 2 monitors
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  10. #10
    Head Hunted anhn's Avatar
    Join Date
    Aug 2007
    Location
    Australia
    Posts
    3,669

    Re: excel userform combobox dropdown position

    I also use 2 monitors but I've never seen that problem and cannot replicate it.
    It's weird!
    What happens if both Excel and VBA code windows are on the same monitor?
    • Don't forget to use [CODE]your code here[/CODE] when posting code
    • If your question was answered please use Thread Tools to mark your thread [RESOLVED]
    • Don't forget to RATE helpful posts

    • Baby Steps a guided tour
    • IsDigits() and IsNumber() functions • Wichmann-Hill Random() function • >> and << functions for VB • CopyFileByChunk

  11. #11

    Thread Starter
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: excel userform combobox dropdown position

    if excel application on left monitor (primary) combobox works correctly
    if excel application on right monitor, combo dropdown is always on left monitor (at position 0 left), regardless of what window (or desktop) is displaying on left monitor
    excel application, full screen or normal, no difference, it has been happenig since i started using 2 monitors
    excel version 2000
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  12. #12
    Head Hunted anhn's Avatar
    Join Date
    Aug 2007
    Location
    Australia
    Posts
    3,669

    Re: excel userform combobox dropdown position

    I have no way to replicate the problem. It works fine on my PC.
    Try to swap primary monitor to see what happens.
    • Don't forget to use [CODE]your code here[/CODE] when posting code
    • If your question was answered please use Thread Tools to mark your thread [RESOLVED]
    • Don't forget to RATE helpful posts

    • Baby Steps a guided tour
    • IsDigits() and IsNumber() functions • Wichmann-Hill Random() function • >> and << functions for VB • CopyFileByChunk

  13. #13

    Thread Starter
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: excel userform combobox dropdown position

    no matter what position excel application, i can drag the userform anywhere in either monitor, as long as it is in the primary monitor the drop down is in the correct position, but the drop down list will never appear on the other monitor, i tried moving the secondary to the right side of the primary, but the effect is still the same, the dropdown is at the right edge of the primary
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  14. #14
    Head Hunted anhn's Avatar
    Join Date
    Aug 2007
    Location
    Australia
    Posts
    3,669

    Re: excel userform combobox dropdown position

    I have no idea. At work, I use Excel 2003 with 2 monitors. I've never had that problem.
    I guess perhaps the problem of display driver.
    • Don't forget to use [CODE]your code here[/CODE] when posting code
    • If your question was answered please use Thread Tools to mark your thread [RESOLVED]
    • Don't forget to RATE helpful posts

    • Baby Steps a guided tour
    • IsDigits() and IsNumber() functions • Wichmann-Hill Random() function • >> and << functions for VB • CopyFileByChunk

  15. #15

    Thread Starter
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: excel userform combobox dropdown position

    I guess perhaps the problem of display driver.
    ATI RADEON XPRESS
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  16. #16
    New Member
    Join Date
    Aug 2014
    Posts
    10

    Re: excel userform combobox dropdown position

    Quote Originally Posted by westconn1 View Post
    ATI RADEON XPRESS
    I guess nobody every got this question answered. I"m having same problem.

    The userform startup position is fine. But when I call me.comboboxname.dropdown method (which I like to call when userform initializes, because who wants their users to have to click the dropdown arrow if you can make it dropdown for them), the userform itself remains displayed perfectly (center of screen - and ALL I have going here is one laptop, so nothing to do with monitors), but the 'dropdown' (with combobox list contents and all) appears at upper left hand corner of monitor.

    I guess the position is kind of nice - but very bizarre and unexpected. I doubt this is a "display problem".

  17. #17
    New Member
    Join Date
    Aug 2014
    Posts
    10

    Re: excel userform combobox dropdown position

    PS, for the love of God, will people please stop using "dim" as a verb. DIM is a vba keyword, the verb, if you want to try to use it in a grammer context, is DECLARE. Declare variables using the Dim keyword. Not "dim variables".

  18. #18
    New Member
    Join Date
    Aug 2014
    Posts
    10

    Re: excel userform combobox dropdown position

    I figured it out, the Initialize event of the combobox is simply too soon for Excel. the program does not recognize the position yet, so .dropdown method of combobox results in default upper top left position - regardless of the position of userform.

    I solved by coding this in the Sub that I created to display the combobox in the first place, rather than calling the combobox's .dropdown method within the form's initialize event.. Excel userforms REALLY NEED an 'open' event, and a few more events frankly, if anyone from MS reads this in the next decade.

  19. #19

    Thread Starter
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: excel userform combobox dropdown position

    the verb, if you want to try to use it in a grammer context, is DECLARE
    actually the verb would be dimension, which dim is an abbreviation of

    i have never been able to resolve the original problem, as it happens with many other programs too, including outlook express and others i can not think of at the present, i have just accepted it as a downside to multiple monitors
    having been prompted here, i will be testing on windows 10 sometime soon, to see if microsoft has resolved the issue at all
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

Posting Permissions

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



Click Here to Expand Forum to Full Width