View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dom_Ciccone Dom_Ciccone is offline
external usenet poster
 
Posts: 52
Default Excel crash based on this action

Try using the ListIndex property of the combobox to set the default value.
The first item in the list has a listindex number of 0. If your "charttype"
value is the 3rd irem in the list, you would use a ListIndex value of 2.

eg:

sub graph_click
worksheets(2).activate
ComboBox1.ListIndex = 2
end sub


"matelot" wrote:

I have a graph linked to a macro located in Module 1
sub graph_click
worksheets(2).activate
[A1] = "chartype"
end sub
On worksheet#2, I have a comboBox that I want the value to default to
"charttype" which is 1 of the drop down values. I first tried combobox1.value
= "charttype" and it didn't work. As a workaround, I update the cell that the
combobox is linked to in this case A1. However, after 2 clicks test on the
graph, my excel always crashed. Is it because I am not supposed to update the
cell that is linked to the combobox result?

Help