PC Review


Reply
Thread Tools Rate Thread

Combobox Dropbutton click event

 
 
Gig
Guest
Posts: n/a
 
      21st Mar 2009
I'm trying to set the rowsource of a combobox when the drop down
button is clicked. It looks to be working fine, then I get an error
message from Excel saying that it has encountered a problem and must
shut down.

I stepped through the code with the debug feature and there is
definitely something wrong, but I've not been able to figure it out.
This is the code.

Private Sub ComboBox6_DropButtonClick()
ComboBox6.RowSource = "h_outermagnetbore"
End Sub

h_outermagnetbore is a range

When I click on the drop button, the selections are there, but then
the error statement comes up immediately and I must shut down Excel. I
can probably figure out some other way, but it seems like this should
work. Can anyone tell me why it won't work?

Thanks,
Greg
 
Reply With Quote
 
 
 
 
Barb Reinhardt
Guest
Posts: n/a
 
      21st Mar 2009
If the source is a range with the name h_outer ... , then why is it in
quotation marks?

"Gig" wrote:

> I'm trying to set the rowsource of a combobox when the drop down
> button is clicked. It looks to be working fine, then I get an error
> message from Excel saying that it has encountered a problem and must
> shut down.
>
> I stepped through the code with the debug feature and there is
> definitely something wrong, but I've not been able to figure it out.
> This is the code.
>
> Private Sub ComboBox6_DropButtonClick()
> ComboBox6.RowSource = "h_outermagnetbore"
> End Sub
>
> h_outermagnetbore is a range
>
> When I click on the drop button, the selections are there, but then
> the error statement comes up immediately and I must shut down Excel. I
> can probably figure out some other way, but it seems like this should
> work. Can anyone tell me why it won't work?
>
> Thanks,
> Greg
>

 
Reply With Quote
 
Michel Angelosanto
Guest
Posts: n/a
 
      22nd Mar 2009
try something like that:

Private Sub ComboBox6_DropButtonClick()
ComboBox6.Rowsource = Application.Transpose(Range(h_outermagnetbore))
End Sub


"Gig" <(E-Mail Removed)> a écrit dans le message de
news:a0091b62-c755-4583-8669-(E-Mail Removed)...
> I'm trying to set the rowsource of a combobox when the drop down
> button is clicked. It looks to be working fine, then I get an error
> message from Excel saying that it has encountered a problem and must
> shut down.
>
> I stepped through the code with the debug feature and there is
> definitely something wrong, but I've not been able to figure it out.
> This is the code.
>
> Private Sub ComboBox6_DropButtonClick()
> ComboBox6.RowSource = "h_outermagnetbore"
> End Sub
>
> h_outermagnetbore is a range
>
> When I click on the drop button, the selections are there, but then
> the error statement comes up immediately and I must shut down Excel. I
> can probably figure out some other way, but it seems like this should
> work. Can anyone tell me why it won't work?
>
> Thanks,
> Greg


--
Michel Angelosanto, Bordeaux
Dernières mises à jour du site Voyage au pays Internet
http://angelosa.free.fr/index.php?t=8

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
ComboBox click event warbornster@gmail.com Microsoft Outlook Form Programming 1 2nd Feb 2007 02:56 PM
Click event of combobox Peter Ostermann Microsoft Excel Programming 0 7th Dec 2006 07:54 PM
Right click event on ComboBox Hardik Shah Microsoft VB .NET 2 21st Dec 2005 02:31 PM
Right click event on combobox Hardik Shah Microsoft Dot NET 0 18th Dec 2005 01:55 PM
Simulate Click-Event in ComboBox DraguVaso Microsoft VB .NET 4 30th Mar 2004 09:38 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:43 AM.