PC Review


Reply
Thread Tools Rate Thread

Automatic line change

 
 
=?Utf-8?B?QW5kcsOpIEJvaWxlYXU=?=
Guest
Posts: n/a
 
      7th Dec 2006
Greetings,
I am trying to have Excel work like Word for text writing without using
WrapText. My project is to activate Ã* short VBA procedure each time the user
presses the space bar so that there is an automatic line change whenever the
number of characters reach a certain limit.
I can control the character limit with the Len function and the space bar
with Application.OnKey " " (I had to dream that one up as not part of the VBA
Help files).
The problem is that I can not find a way to allow the procedure to be
executed as long as the focus is on the cursor: the procedure works fine
otherwise.
Of course, I would then have to find a way to get the cursor back at it's
original place but I have to solve problem one first.
I am of course open to any other approach that would work.
Thank you for your help.
--
Popsie
 
Reply With Quote
 
 
 
 
NickHK
Guest
Posts: n/a
 
      7th Dec 2006
VBA code will not run when the user is editing in a cell, so you have
consider a different concept.
If the user is typing into a text box then you can monitor this input as you
wish.
When finished, you transfer the text to the required cell.

NickHK

"André Boileau" <(E-Mail Removed)> wrote in message
news:E7A0A338-6F60-484A-9C63-(E-Mail Removed)...
> Greetings,
> I am trying to have Excel work like Word for text writing without using
> WrapText. My project is to activate à short VBA procedure each time the

user
> presses the space bar so that there is an automatic line change whenever

the
> number of characters reach a certain limit.
> I can control the character limit with the Len function and the space bar
> with Application.OnKey " " (I had to dream that one up as not part of the

VBA
> Help files).
> The problem is that I can not find a way to allow the procedure to be
> executed as long as the focus is on the cursor: the procedure works fine
> otherwise.
> Of course, I would then have to find a way to get the cursor back at it's
> original place but I have to solve problem one first.
> I am of course open to any other approach that would work.
> Thank you for your help.
> --
> Popsie



 
Reply With Quote
 
=?Utf-8?B?QW5kcsOpIEJvaWxlYXU=?=
Guest
Posts: n/a
 
      10th Dec 2006
Hello Nick,
There must be some way I can change the property of a cell or a group of
cell to limit the number of characters it will accept?
Thanks for your help.
--
Popsie


"NickHK" wrote:

> VBA code will not run when the user is editing in a cell, so you have
> consider a different concept.
> If the user is typing into a text box then you can monitor this input as you
> wish.
> When finished, you transfer the text to the required cell.
>
> NickHK
>
> "André Boileau" <(E-Mail Removed)> wrote in message
> news:E7A0A338-6F60-484A-9C63-(E-Mail Removed)...
> > Greetings,
> > I am trying to have Excel work like Word for text writing without using
> > WrapText. My project is to activate Ã* short VBA procedure each time the

> user
> > presses the space bar so that there is an automatic line change whenever

> the
> > number of characters reach a certain limit.
> > I can control the character limit with the Len function and the space bar
> > with Application.OnKey " " (I had to dream that one up as not part of the

> VBA
> > Help files).
> > The problem is that I can not find a way to allow the procedure to be
> > executed as long as the focus is on the cursor: the procedure works fine
> > otherwise.
> > Of course, I would then have to find a way to get the cursor back at it's
> > original place but I have to solve problem one first.
> > I am of course open to any other approach that would work.
> > Thank you for your help.
> > --
> > Popsie

>
>
>

 
Reply With Quote
 
NickHK
Guest
Posts: n/a
 
      11th Dec 2006
André,
Yes, you can with Data Validation, but that is not what you asked.
Otherwise you have the _Change and _SelectionChange events to monitor what
is happening on your worksheet.

NickHK

"André Boileau" <(E-Mail Removed)> wrote in message
news:31421949-99F1-400F-909F-(E-Mail Removed)...
> Hello Nick,
> There must be some way I can change the property of a cell or a group of
> cell to limit the number of characters it will accept?
> Thanks for your help.
> --
> Popsie
>
>
> "NickHK" wrote:
>
> > VBA code will not run when the user is editing in a cell, so you have
> > consider a different concept.
> > If the user is typing into a text box then you can monitor this input as

you
> > wish.
> > When finished, you transfer the text to the required cell.
> >
> > NickHK
> >
> > "André Boileau" <(E-Mail Removed)> wrote in message
> > news:E7A0A338-6F60-484A-9C63-(E-Mail Removed)...
> > > Greetings,
> > > I am trying to have Excel work like Word for text writing without

using
> > > WrapText. My project is to activate à short VBA procedure each time

the
> > user
> > > presses the space bar so that there is an automatic line change

whenever
> > the
> > > number of characters reach a certain limit.
> > > I can control the character limit with the Len function and the space

bar
> > > with Application.OnKey " " (I had to dream that one up as not part of

the
> > VBA
> > > Help files).
> > > The problem is that I can not find a way to allow the procedure to be
> > > executed as long as the focus is on the cursor: the procedure works

fine
> > > otherwise.
> > > Of course, I would then have to find a way to get the cursor back at

it's
> > > original place but I have to solve problem one first.
> > > I am of course open to any other approach that would work.
> > > Thank you for your help.
> > > --
> > > Popsie

> >
> >
> >



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
'Automatic' change to Line Chart from XY Scatter Chart - cannotchange back Daniel Microsoft Excel Discussion 2 10th Nov 2010 04:29 PM
How (where ?) to change the line length or turn off auto-line wrapping in Outlook 2003 ? Sven Claasen Microsoft Outlook Discussion 3 9th Mar 2010 06:44 AM
How (where ?) to change the line length or turn off auto-line wrapping in Outlook 2003 ? Sven Claasen Windows XP Help 0 8th Mar 2010 03:09 PM
How (where ?) to change the line length or turn off auto-line wrapping in Outlook 2003 ? Sven Claasen Microsoft Outlook 0 8th Mar 2010 03:09 PM
How do I insert automatic line breaks at the end of each line? =?Utf-8?B?c21pdGE=?= Microsoft Word Document Management 2 13th Aug 2006 04:36 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:12 PM.