Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Controlling ComboBox from VBA-script

Hi,

How can I control the data in a ComboBox without using cells in a worksheet?

Now I have the ListFillRange pointing to cells in my worksheet.
I don't want that. I want to set the value for this from my VBA-script.
Is that possible?
I already use "ComboBox1.Value" to read out its value.

Best regards,
/Sören
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Controlling ComboBox from VBA-script

Sören,

ListBox1.AddItem "Item 1"

NickHK

"Sören_Marodören" wrote in message
...
Hi,

How can I control the data in a ComboBox without using cells in a

worksheet?

Now I have the ListFillRange pointing to cells in my worksheet.
I don't want that. I want to set the value for this from my VBA-script.
Is that possible?
I already use "ComboBox1.Value" to read out its value.

Best regards,
/Sören



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Controlling ComboBox from VBA-script

Hi NickHK,

This does not work for me.
But I tryed something similar:
ComboBox1.List = Array("Alfa", "Beta", "Gamma", "Delta")
and also added a default value with the following line:
ComboBox1.Value = "Gamma"

So now it works for me.

Br,
/Sören

"NickHK" wrote:

Sören,

ListBox1.AddItem "Item 1"

NickHK

"Sören_Marodören" wrote in message
...
Hi,

How can I control the data in a ComboBox without using cells in a

worksheet?

Now I have the ListFillRange pointing to cells in my worksheet.
I don't want that. I want to set the value for this from my VBA-script.
Is that possible?
I already use "ComboBox1.Value" to read out its value.

Best regards,
/Sören




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
VB Script based on combobox selection gmac[_2_] Excel Programming 1 March 30th 07 07:34 PM
Combobox options based on the input of another combobox afmullane[_5_] Excel Programming 1 May 3rd 06 01:44 PM
Combobox, Controlling columnwidths i curtain Claus[_3_] Excel Programming 0 December 5th 05 01:19 PM
Excel 2000/XP script to Excel97 script hat Excel Programming 3 March 2nd 04 03:56 PM


All times are GMT +1. The time now is 03:30 PM.

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"