ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how do i use a macro (https://www.excelbanter.com/excel-programming/414367-how-do-i-use-macro.html)

Oshtruck user

how do i use a macro
 
I am looking for a macro that will run through a selected range of cells that
will stop at each cell and wait for a keyboard button to be pressed, and
depending on the button pressed will do different types of formatting. Can
anyone help. I don't want this to work with a Dialog box or anything, I want
it to work with keyboard buttons. For example the first cell in the range it
waits for me to press a button. I press the b button and it bolds it. The
second cell in the range it waits for me to press a button. I press the i
button and it puts the cell in italics. And so on..

Jim Thomlinson

how do i use a macro
 
Macros do not pause to wait for keyboard input as you are requesting. There
are event that you can catch such as change, selection change or such. That
bieng said Ctrl+B is bold and Ctrl+I is italics...
--
HTH...

Jim Thomlinson


"Oshtruck user" wrote:

I am looking for a macro that will run through a selected range of cells that
will stop at each cell and wait for a keyboard button to be pressed, and
depending on the button pressed will do different types of formatting. Can
anyone help. I don't want this to work with a Dialog box or anything, I want
it to work with keyboard buttons. For example the first cell in the range it
waits for me to press a button. I press the b button and it bolds it. The
second cell in the range it waits for me to press a button. I press the i
button and it puts the cell in italics. And so on..


Otto Moehrbach[_2_]

how do i use a macro
 
The only way I can think of for what you say to work is to use an InputBox.
Basically you would have a Worksheet_SelectionChange event macro that would
do something when you click on a cell in a specific range (chosen by you).
What it would do is present an InputBox and ask you to enter something
(what??). If you enter a "b" the macro would bold the cell, an "i" and it
would italicize the cell, and so forth. Would this work for you? HTH Otto
"Oshtruck user" wrote in message
...
I am looking for a macro that will run through a selected range of cells
that
will stop at each cell and wait for a keyboard button to be pressed, and
depending on the button pressed will do different types of formatting.
Can
anyone help. I don't want this to work with a Dialog box or anything, I
want
it to work with keyboard buttons. For example the first cell in the range
it
waits for me to press a button. I press the b button and it bolds it.
The
second cell in the range it waits for me to press a button. I press the i
button and it puts the cell in italics. And so on..




Jim Thomlinson

how do i use a macro
 
I would be more inclined to use hot key macro's. The last line of the macro
would take the user to the next cell in the range. That would be my 2 cents...

--
HTH...

Jim Thomlinson


"Otto Moehrbach" wrote:

The only way I can think of for what you say to work is to use an InputBox.
Basically you would have a Worksheet_SelectionChange event macro that would
do something when you click on a cell in a specific range (chosen by you).
What it would do is present an InputBox and ask you to enter something
(what??). If you enter a "b" the macro would bold the cell, an "i" and it
would italicize the cell, and so forth. Would this work for you? HTH Otto
"Oshtruck user" wrote in message
...
I am looking for a macro that will run through a selected range of cells
that
will stop at each cell and wait for a keyboard button to be pressed, and
depending on the button pressed will do different types of formatting.
Can
anyone help. I don't want this to work with a Dialog box or anything, I
want
it to work with keyboard buttons. For example the first cell in the range
it
waits for me to press a button. I press the b button and it bolds it.
The
second cell in the range it waits for me to press a button. I press the i
button and it puts the cell in italics. And so on..





Otto Moehrbach[_2_]

how do i use a macro
 
Jim
Could you direct me to where I can get more information about hot key
macros? Thanks. Otto
"Jim Thomlinson" wrote in message
...
I would be more inclined to use hot key macro's. The last line of the macro
would take the user to the next cell in the range. That would be my 2
cents...

--
HTH...

Jim Thomlinson


"Otto Moehrbach" wrote:

The only way I can think of for what you say to work is to use an
InputBox.
Basically you would have a Worksheet_SelectionChange event macro that
would
do something when you click on a cell in a specific range (chosen by
you).
What it would do is present an InputBox and ask you to enter something
(what??). If you enter a "b" the macro would bold the cell, an "i" and
it
would italicize the cell, and so forth. Would this work for you? HTH
Otto
"Oshtruck user" wrote in message
...
I am looking for a macro that will run through a selected range of cells
that
will stop at each cell and wait for a keyboard button to be pressed,
and
depending on the button pressed will do different types of formatting.
Can
anyone help. I don't want this to work with a Dialog box or anything,
I
want
it to work with keyboard buttons. For example the first cell in the
range
it
waits for me to press a button. I press the b button and it bolds it.
The
second cell in the range it waits for me to press a button. I press
the i
button and it puts the cell in italics. And so on..







Otto Moehrbach[_2_]

how do i use a macro
 
Jim
I realize now what you meant. Yes, that is a good idea for the OP.
Otto
"Otto Moehrbach" wrote in message
...
Jim
Could you direct me to where I can get more information about hot key
macros? Thanks. Otto
"Jim Thomlinson" wrote in
message ...
I would be more inclined to use hot key macro's. The last line of the
macro
would take the user to the next cell in the range. That would be my 2
cents...

--
HTH...

Jim Thomlinson


"Otto Moehrbach" wrote:

The only way I can think of for what you say to work is to use an
InputBox.
Basically you would have a Worksheet_SelectionChange event macro that
would
do something when you click on a cell in a specific range (chosen by
you).
What it would do is present an InputBox and ask you to enter something
(what??). If you enter a "b" the macro would bold the cell, an "i" and
it
would italicize the cell, and so forth. Would this work for you? HTH
Otto
"Oshtruck user" wrote in
message
...
I am looking for a macro that will run through a selected range of
cells
that
will stop at each cell and wait for a keyboard button to be pressed,
and
depending on the button pressed will do different types of formatting.
Can
anyone help. I don't want this to work with a Dialog box or anything,
I
want
it to work with keyboard buttons. For example the first cell in the
range
it
waits for me to press a button. I press the b button and it bolds it.
The
second cell in the range it waits for me to press a button. I press
the i
button and it puts the cell in italics. And so on..









All times are GMT +1. The time now is 04:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com