Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Newbie : Combo box on cell ?


I am using Excel 97.

I have the following task. Management wants to control what the end user
puts into a column of the spreadsheet. The column is a comment column. The
end user can only enter 1 of 5 sentences. For example, the combo box might
have a choice
like, "The client was charged ________ ". Then the user types in the number
in the underline.

Can the above be done. Is there another way. The managers prefer a combo box
on each cell.



  #2   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Newbie : Combo box on cell ?

Newbie,

Consider using "Data Validation" with the selection items
in a List. See Excel help for this feature.

Dave

-----Original Message-----

I am using Excel 97.

I have the following task. Management wants to control

what the end user
puts into a column of the spreadsheet. The column is a

comment column. The
end user can only enter 1 of 5 sentences. For example,

the combo box might
have a choice
like, "The client was charged ________ ". Then the user

types in the number
in the underline.

Can the above be done. Is there another way. The managers

prefer a combo box
on each cell.



.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Newbie : Combo box on cell ?

If you are familiar macroes you could do as follows:

1) Go in to the macro-editor
2) insert a userform (in the code named userform1)
3) put a combobox on the userform (in the code named combobox1)
4) dbl-click on the userform (enter the code-editer)
5) insert the following :

Private Sub ComboBox1_Change()
ActiveCell = ComboBox1.Text
UserForm1.Hide
End Sub

Private Sub ComboBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
ActiveCell = ComboBox1.Text
UserForm1.Hide
End Sub

Private Sub UserForm_Initialize()
ComboBox1.Clear
ComboBox1.AddItem ("The client was charged ")
ComboBox1.AddItem ("I'm a good boy ")
ComboBox1.AddItem ("It wasn't me")
ComboBox1.AddItem ("Give me an icecream ")
ComboBox1.AddItem ("Whatever..... ")
End Sub

6) in the objectbrowser you select sheet 1
7) In the edit feild you insert :

Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel
As Boolean)
If Target.Column = 5 Then
UserForm1.Show ' Replace "5" with the columnnumber of the comment
column
Cancel = True ' prevents the normal Rightclick rutine from running
end if
End Sub


This should do it!

When you rightclick on the "comment-column" the userform shows and
when you make a selection it puts the selection into the active cell.

Hope you can use it !

;-) Søren Remfeldt

"RM" wrote in message link.net...
I am using Excel 97.

I have the following task. Management wants to control what the end user
puts into a column of the spreadsheet. The column is a comment column. The
end user can only enter 1 of 5 sentences. For example, the combo box might
have a choice
like, "The client was charged ________ ". Then the user types in the number
in the underline.

Can the above be done. Is there another way. The managers prefer a combo box
on each cell.

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
Different color on cell [newbie] Jon Excel Discussion (Misc queries) 2 June 26th 09 11:17 AM
cell formatting [newbie] Jon Excel Discussion (Misc queries) 3 March 28th 09 06:41 PM
Real Newbie newbie question Dave New Users to Excel 0 January 10th 07 07:55 PM
excel newbie cell update [email protected] Excel Discussion (Misc queries) 1 November 16th 06 01:55 PM
Help with Newbie question - Cell Reference [email protected] New Users to Excel 1 May 31st 06 02:43 AM


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