Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
MACRO: Selecting "Cancel" from a drop down to copy and paste entirerow to another sheet | Excel Discussion (Misc queries) | |||
MACRO: Selecting "Cancel" from a drop down to copy and paste entirerow to another sheet | Excel Worksheet Functions | |||
how can I disable "cutting cells" and "drag and drop "in excel ? | Excel Worksheet Functions | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
Macro to concatenate into "B1" B2 thru B"x" based on new data in "Col A" | Excel Discussion (Misc queries) |