Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default Combobox Help...

Hi,

I have a combobox from the control toolbox which I have placed on a
worksheet. I have some code that runs from the worksheet selection
change event, (basically I am replacing the in cell data validation
that I was using, the reason I went down this route was that the sheet
is zoomed to about 70% and at this level the validation is barealy
ledgible) the code is:

' Position the combobox to the activecell
ActiveSheet.CellMenu.Top = ActiveCell.Top + 18
ActiveSheet.CellMenu.Left = ActiveCell.Left
' Make the combobox visible
ActiveSheet.CellMenu.Visible = True
' Show the dropdown list
ActiveSheet.CellMenu.DropDown
' Make the combobox not have anything preselected
ActiveSheet.CellMenu.ListIndex = -1

If the user clicks on another cell, I just make the combobox inivisible
however this is where my problem occurs as the dropdown doesn't go
away, also if the combobox list is showing and I move to another
workbook the list follows as the user hasn't clicked anything on the
dropdown. The CellMenu is just a comob box that has an onclick event
that puts the value of the combobox in the activecell.

Any suggestions would be very much appreciated, cheers,

James

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,726
Default Combobox Help...

Did you turn screenupdating off?

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


wrote in message
ups.com...
Hi,

I have a combobox from the control toolbox which I have placed on a
worksheet. I have some code that runs from the worksheet selection
change event, (basically I am replacing the in cell data validation
that I was using, the reason I went down this route was that the sheet
is zoomed to about 70% and at this level the validation is barealy
ledgible) the code is:

' Position the combobox to the activecell
ActiveSheet.CellMenu.Top = ActiveCell.Top + 18
ActiveSheet.CellMenu.Left = ActiveCell.Left
' Make the combobox visible
ActiveSheet.CellMenu.Visible = True
' Show the dropdown list
ActiveSheet.CellMenu.DropDown
' Make the combobox not have anything preselected
ActiveSheet.CellMenu.ListIndex = -1

If the user clicks on another cell, I just make the combobox inivisible
however this is where my problem occurs as the dropdown doesn't go
away, also if the combobox list is showing and I move to another
workbook the list follows as the user hasn't clicked anything on the
dropdown. The CellMenu is just a comob box that has an onclick event
that puts the value of the combobox in the activecell.

Any suggestions would be very much appreciated, cheers,

James



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default Combobox Help...

Hi,

No, do I need to?

I think what I need to do is the opposite of the dropdown method of the
combo if no selection is made and the user has moved away from the cell
that I want the combo in. However I can't work out how to do this, from
what I have read the dropdown method is the same as the mouse down
event but I can't seem to call this to hide the list.

Any help, suggestions, anything at all...?

Thanks in advance,

James

Bob Phillips wrote:
Did you turn screenupdating off?

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


wrote in message
ups.com...
Hi,

I have a combobox from the control toolbox which I have placed on a
worksheet. I have some code that runs from the worksheet selection
change event, (basically I am replacing the in cell data validation
that I was using, the reason I went down this route was that the sheet
is zoomed to about 70% and at this level the validation is barealy
ledgible) the code is:

' Position the combobox to the activecell
ActiveSheet.CellMenu.Top = ActiveCell.Top + 18
ActiveSheet.CellMenu.Left = ActiveCell.Left
' Make the combobox visible
ActiveSheet.CellMenu.Visible = True
' Show the dropdown list
ActiveSheet.CellMenu.DropDown
' Make the combobox not have anything preselected
ActiveSheet.CellMenu.ListIndex = -1

If the user clicks on another cell, I just make the combobox inivisible
however this is where my problem occurs as the dropdown doesn't go
away, also if the combobox list is showing and I move to another
workbook the list follows as the user hasn't clicked anything on the
dropdown. The CellMenu is just a comob box that has an onclick event
that puts the value of the combobox in the activecell.

Any suggestions would be very much appreciated, cheers,

James


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
fill combobox depending on selection from another combobox Adam Francis Excel Discussion (Misc queries) 2 July 24th 08 07:39 PM
Combobox items determined by the selection in another combobox Alerion Excel Programming 2 September 13th 06 01:07 PM
Combobox options based on the input of another combobox afmullane[_5_] Excel Programming 1 May 3rd 06 01:44 PM
ComboBox list reliant on the entry from a different ComboBox ndm berry[_2_] Excel Programming 4 October 4th 05 04:40 PM
How Do I Load A ComboBox RowSource From The Results Of Another ComboBox Minitman[_4_] Excel Programming 3 October 26th 04 07:58 PM


All times are GMT +1. The time now is 12:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"