Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Automatic line change

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Automatic line change

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" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Automatic line change

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" wrote in message
...
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




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Automatic line change

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" wrote in message
...
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" wrote in message
...
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
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
change line formatting in line chart - Excel 2007 LisaK Charts and Charting in Excel 1 August 27th 09 11:09 AM
How to change bar to line in line-column on 2 axes chart in Excel2 jaysan3 Charts and Charting in Excel 2 July 2nd 08 11:13 AM
change last serie to be line in the line-column Excel chart in Wor Eric Charts and Charting in Excel 3 June 30th 07 04:58 PM
How to change color of line and point markers on a line graph SASPerson Charts and Charting in Excel 1 November 15th 06 06:43 PM
Make a line in a bar chart, and change color of any bars that exceed the line MarkM Excel Discussion (Misc queries) 4 July 5th 06 04:06 PM


All times are GMT +1. The time now is 02:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"