Reply
 
Thread Tools Display Modes
  #1   Report Post  
Gmann Gmann is offline
Junior Member
 
Posts: 0
Post excel and combobox question

Hi, I have some code that I am experimenting with in excel:

Private Sub ComboBox1_Change()
Select Case ComboBox1.Text
Case "Dogs"
MsgBox "Dogs"
Case "Cats"
MsgBox "Cat"
Case "Mice"
MsgBox "Mice"
Case Else
End Select
End Sub

Private Sub Worksheet_Activate()
ComboBox1.Clear
ComboBox1.AddItem "Dogs"
ComboBox1.AddItem "Cats"
ComboBox1.AddItem "Mice"
ComboBox1.Text = ComboBox1.List(0)
End Sub

When I link the output to a cell, it returns the word value, how can I get it to return a number from 1-3, instead of the word values? Thanks!
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail Merge Question with Excel Amber Microsoft Word Help 4 April 24th 09 11:15 PM
ComboBox Help Kenny Microsoft Word Help 1 September 22nd 07 01:32 AM
Another mailmerge from Excel question Paul - NottsUK Mailmerge 2 May 18th 05 10:19 AM
combobox Gman1959 Microsoft Word Help 1 January 27th 05 11:16 PM
merge with excel question Cowtoon Mailmerge 1 December 7th 04 10:51 AM


All times are GMT +1. The time now is 06:17 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"