#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default ComboBox

I am trying to have the workbook tab names come up in a ComboBox on my cover
sheet and store the value as a string variable for later use. I have tried
using some of the suggestions listed here and modifying them but with no
luck. Any sugestions?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default ComboBox

Private Sub ComboBox1_DropButtonClick()
Dim sh As Worksheet
ComboBox1.Clear
For Each sh In ActiveWorkbook.Worksheets
ComboBox1.AddItem sh.Name
Next sh
End Sub

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Jim T." wrote in message
...
I am trying to have the workbook tab names come up in a ComboBox on my

cover
sheet and store the value as a string variable for later use. I have tried
using some of the suggestions listed here and modifying them but with no
luck. Any sugestions?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default ComboBox

I have tried that but it says but it says 'Object Required" at
ComboBox1.Clear. I diminsioned CombBox1 as a ComboBox and got past there but
it then comes up 'Object variable or block variable not set.' on the same
line.


"Bob Phillips" wrote:

Private Sub ComboBox1_DropButtonClick()
Dim sh As Worksheet
ComboBox1.Clear
For Each sh In ActiveWorkbook.Worksheets
ComboBox1.AddItem sh.Name
Next sh
End Sub

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Jim T." wrote in message
...
I am trying to have the workbook tab names come up in a ComboBox on my

cover
sheet and store the value as a string variable for later use. I have tried
using some of the suggestions listed here and modifying them but with no
luck. Any sugestions?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default ComboBox

What combobox are you using, the forms toolbar or the controls toolbar?

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Jim T." wrote in message
...
I have tried that but it says but it says 'Object Required" at
ComboBox1.Clear. I diminsioned CombBox1 as a ComboBox and got past there

but
it then comes up 'Object variable or block variable not set.' on the same
line.


"Bob Phillips" wrote:

Private Sub ComboBox1_DropButtonClick()
Dim sh As Worksheet
ComboBox1.Clear
For Each sh In ActiveWorkbook.Worksheets
ComboBox1.AddItem sh.Name
Next sh
End Sub

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Jim T." wrote in message
...
I am trying to have the workbook tab names come up in a ComboBox on my

cover
sheet and store the value as a string variable for later use. I have

tried
using some of the suggestions listed here and modifying them but with

no
luck. Any sugestions?






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default ComboBox

Got it thanks

"Bob Phillips" wrote:

What combobox are you using, the forms toolbar or the controls toolbar?

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Jim T." wrote in message
...
I have tried that but it says but it says 'Object Required" at
ComboBox1.Clear. I diminsioned CombBox1 as a ComboBox and got past there

but
it then comes up 'Object variable or block variable not set.' on the same
line.


"Bob Phillips" wrote:

Private Sub ComboBox1_DropButtonClick()
Dim sh As Worksheet
ComboBox1.Clear
For Each sh In ActiveWorkbook.Worksheets
ComboBox1.AddItem sh.Name
Next sh
End Sub

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Jim T." wrote in message
...
I am trying to have the workbook tab names come up in a ComboBox on my
cover
sheet and store the value as a string variable for later use. I have

tried
using some of the suggestions listed here and modifying them but with

no
luck. Any sugestions?








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
ComboBox Chris Excel Worksheet Functions 3 June 8th 09 03:22 PM
fill combobox depending on selection from another combobox Adam Francis Excel Discussion (Misc queries) 2 July 24th 08 07:39 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
Populating combobox from another combobox David Goodall Excel Programming 1 September 12th 04 03:42 PM


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

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

About Us

"It's about Microsoft Excel"