Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
I write reports quite frequently and a lot of the sentences that I write are
reprtitive. Therefore I am looking a way to optimize my time by automating these sentences. A minor complication to this entire scenario is that my text is in a text box. I could use some help on this. Please. Thank you |
#2
![]() |
|||
|
|||
![]()
You can use AutoCorrect to replace a typed code with a sentence. For
example: Choose ToolsAutoCorrect Options In the Replace box, type a code, e.g. cs1 (the code will represent Comment Sentence 1) In the With box, type the first sentence Click the Add button, and enter codes and text for the remaining sentences. Click OK In a comment, type a code, then press the space bar, or type a punctuation character. The code will be replaced by the text. (The AutoCorrect entries will also work on the worksheet, and in other Office applications.) fsattar wrote: I write reports quite frequently and a lot of the sentences that I write are reprtitive. Therefore I am looking a way to optimize my time by automating these sentences. A minor complication to this entire scenario is that my text is in a text box. I could use some help on this. Please. Thank you -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html |
#3
![]() |
|||
|
|||
![]()
Hi
Assuming a Control toolbox textbox, if so it's no complication, but rather "the way to do it". Make its Keydown code look like this (in the worksheet module for a box on a worksheet, in the userform module for a box on a userform): Private Sub TextBox1_KeyDown(ByVal KeyCode _ As MSForms.ReturnInteger, _ ByVal Shift As Integer) If Shift = 2 Then 'Ctrl Select Case KeyCode Case 49 ' Ctrl 1 KeyCode = 0 TextBox1.SelText = _ "Harald says Hi!" Case 50 'Ctrl 2 KeyCode = 0 TextBox1.SelText = _ "Harald says You're fired!" Case Else End Select End If End Sub Now hold Ctrl while typing 1 or 2 into it and text is entered. HTH. Best wishes Harald "fsattar" skrev i melding ... I write reports quite frequently and a lot of the sentences that I write are reprtitive. Therefore I am looking a way to optimize my time by automating these sentences. A minor complication to this entire scenario is that my text is in a text box. I could use some help on this. Please. Thank you |
#4
![]() |
|||
|
|||
![]()
Thank you for your help.
"Debra Dalgleish" wrote: You can use AutoCorrect to replace a typed code with a sentence. For example: Choose ToolsAutoCorrect Options In the Replace box, type a code, e.g. cs1 (the code will represent Comment Sentence 1) In the With box, type the first sentence Click the Add button, and enter codes and text for the remaining sentences. Click OK In a comment, type a code, then press the space bar, or type a punctuation character. The code will be replaced by the text. (The AutoCorrect entries will also work on the worksheet, and in other Office applications.) fsattar wrote: I write reports quite frequently and a lot of the sentences that I write are reprtitive. Therefore I am looking a way to optimize my time by automating these sentences. A minor complication to this entire scenario is that my text is in a text box. I could use some help on this. Please. Thank you -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
excel save as csv - force text qualifier on every text field | Excel Discussion (Misc queries) | |||
How can I Excel to re-size when wrapping text in merged cells | Excel Discussion (Misc queries) | |||
How I do I rotate text in an excel cell? The rotate commands is g. | Excel Discussion (Misc queries) | |||
numbers and text in Excel to read as text keeping the leading zer. | Excel Discussion (Misc queries) | |||
Importing text files into Excel | Excel Discussion (Misc queries) |