Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
fsattar
 
Posts: n/a
Default Repeating text in a text box within Excel.

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   Report Post  
Debra Dalgleish
 
Posts: n/a
Default

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   Report Post  
fsattar
 
Posts: n/a
Default

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


  #4   Report Post  
Harald Staff
 
Posts: n/a
Default

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



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
excel save as csv - force text qualifier on every text field Newbie-Don Excel Discussion (Misc queries) 6 April 2nd 23 08:33 PM
How can I Excel to re-size when wrapping text in merged cells Samjoy Excel Discussion (Misc queries) 4 February 4th 05 12:47 AM
How I do I rotate text in an excel cell? The rotate commands is g. MickG Excel Discussion (Misc queries) 3 December 13th 04 08:14 PM
numbers and text in Excel to read as text keeping the leading zer. Ralph Excel Discussion (Misc queries) 2 December 10th 04 07:05 PM
Importing text files into Excel Christopher Anderson Excel Discussion (Misc queries) 2 December 4th 04 05:57 PM


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