View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Kasey Kern Kasey Kern is offline
external usenet poster
 
Posts: 5
Default help with a "drop down" in a macro

Everything is working OK right now with what I have
done but I wanted to have a "list box" or "drop down" selection come up in
the process. It is the easiest thing for me to make I guess.. Do I have to do
this in a user form? How would I make sure that is done right? I havent done
that very much int eh past and I cant quite remember how... Here is what I
have in the code right now.

Sheets("quote").Range("K2").Select
titletext = InputBox( _
prompt:="Please enter the name of the product being quoted")
ActiveCell.FormulaR1C1 = titletext
Const sPLEASED As String = "We are pleased to submit our " & _
"quotation for # according to the following specifications."
Dim nPos As Long
Dim sRef As String
nPos = InStr(sPLEASED, "#")
sRef = Sheets("Quote").Range("k2").Text
With Range("A16")
.Font.Bold = False
.Value = Application.Substitute(sPLEASED, "#", sRef)
.Characters(nPos, Len(sRef)).Font.Bold = True
End With
Range("C18").Select
End Sub

Any way to add the list boxes in this macro? I already have them made and
linked to cells with input ranges. Also, Is it possible for me to make sure
that when the sentence that is in cell A16 is too long to fit, it will
automatically adjust to fit all the words. I dont want it to shrink, I want
it to wrap. Sometimes, the cell will change size to fit it all, other times
it doesnt. Any way to make sure that it will adjust according to what is in
there?

Thanks in advance for all your help!