Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 138
Default Set the value of a combobox

I have a combobox that I want to set the value of as a default, but I get the
error
'Object doesn't support this property or method'.

Any ideas on how to fix?

Bruce

Sub reset()
Set Sheets("Sheet1").Shapes("ComboBox1").Value = 3
End Sub


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 110
Default Set the value of a combobox

Hello Bruce
If combo from the Tools Box, try this:
Sheet1.ComboBox1.Value = 3

HTH
Cordially
Pascal

"Bruce" a écrit dans le message de
...
I have a combobox that I want to set the value of as a default, but I get

the
error
'Object doesn't support this property or method'.

Any ideas on how to fix?

Bruce

Sub reset()
Set Sheets("Sheet1").Shapes("ComboBox1").Value = 3
End Sub




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default Set the value of a combobox

Bruce,

Set is used to create an object variable. The value of a combobox is a
property, so you do not use set.

Which combobox type are you using?

--
HTH

Bob Phillips

"Bruce" wrote in message
...
I have a combobox that I want to set the value of as a default, but I get

the
error
'Object doesn't support this property or method'.

Any ideas on how to fix?

Bruce

Sub reset()
Set Sheets("Sheet1").Shapes("ComboBox1").Value = 3
End Sub




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
How Do I Load A ComboBox RowSource From The Results Of Another ComboBox Minitman[_4_] Excel Programming 3 October 26th 04 07:58 PM
Populating combobox from another combobox David Goodall Excel Programming 1 September 12th 04 03:42 PM
Combobox David Fixemer Excel Programming 1 February 24th 04 05:03 AM
Combobox Robert Couchman[_4_] Excel Programming 1 February 23rd 04 05:08 PM


All times are GMT +1. The time now is 02:06 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"