ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel macro: Speak on enter (https://www.excelbanter.com/excel-programming/308435-excel-macro-speak-enter.html)

Gary Peitzmeier

Excel macro: Speak on enter
 
I am attempting to create an excel macro that would "read"
a cell when a hyperlink is pushed. The macro is easily
recorded (eg. enter) and when the hyperlink that is
associated with the macro pushed I can see the cell move
but there is no "voice" reading the cell.
The macro script is:
sub read_cell()
'
'read_cell Macro
'Macro recorded 8/29/204 by Gary A . Peitzmeier M.D.
'

'
ActiveCell.Select
End Sub

It appears that the macro is set to go to the cell below
the active cell (eg my enter) but without the
"enter" command in the macro it will not read the text.

Is there anyway to set up this macro without learing about
visual basic?

If not possible is there any way that I could associate a
picture with a Function key (I have a separate program
that can be used to create macros that I could associate
with a function key.

The reason that I am doing this is to try to use a tablet
computer with only a stylus rather than needing a keyboard
for keyboard shortcuts.

thanks in advance. If you could e-mail a solution to
I would be most
apprecative.

Dave Peterson[_3_]

Excel macro: Speak on enter
 
I added a hyperlink to a worksheet via Insert|Hyperlink--I didn't use the
=hyperlink() worksheet function.

Then I could rightclick on the worksheet tab and select view code. I pasted
this in the code window:

Option Explicit
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)

On Error Resume Next
Application.Speech.Speak Target.TextToDisplay
On Error GoTo 0

End Sub



Gary Peitzmeier wrote:

I am attempting to create an excel macro that would "read"
a cell when a hyperlink is pushed. The macro is easily
recorded (eg. enter) and when the hyperlink that is
associated with the macro pushed I can see the cell move
but there is no "voice" reading the cell.
The macro script is:
sub read_cell()
'
'read_cell Macro
'Macro recorded 8/29/204 by Gary A . Peitzmeier M.D.
'

'
ActiveCell.Select
End Sub

It appears that the macro is set to go to the cell below
the active cell (eg my enter) but without the
"enter" command in the macro it will not read the text.

Is there anyway to set up this macro without learing about
visual basic?

If not possible is there any way that I could associate a
picture with a Function key (I have a separate program
that can be used to create macros that I could associate
with a function key.

The reason that I am doing this is to try to use a tablet
computer with only a stylus rather than needing a keyboard
for keyboard shortcuts.

thanks in advance. If you could e-mail a solution to
I would be most
apprecative.


--

Dave Peterson


Gary Peitzmeier

Excel macro: Speak on enter
 
Thanks for your quick reply.
I tried your code and it works to make the cell "speak" but unfortunatly
the hyperlink function causes the focus to move to cell A1 (which is the
cell I assigned to the hyperlink)
What I really want to do is assign a macro or hyperlink to a "word art"
picture at the top of the spreadsheet that when clicked will delete the
cell that is in focus then move down to the cell below and "read" that
cell. A 2nd "button" would change the formatting of the cell that is in
focus and "read" the cell below (eg push one work art button, labeled
completed, to remove an item from a checklist and read the next item
while pushing a 2nd button, labeled "deferred", to highlight a skipped
item of the checklist while moving on to the next item)
If you can help me that would be greatly appreciated.
Gary Peitzmeier




*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Dave Peterson[_3_]

Excel macro: Speak on enter
 
I'm kind of confused.

When you delete a cell (whole row???), the activecell "moves". Then drop down
one row and say that?

Option Explicit
Sub testme()

ActiveCell.EntireRow.Delete
'or
'ActiveCell.Delete shift:=xlUp '???
'activecell is now in the cell that was below

On Error Resume Next
Application.Speech.Speak ActiveCell.Offset(1, 0).Text
On Error GoTo 0

End Sub

(I don't think you're going to be able to use a hyperlink to do all this.)

Gary Peitzmeier wrote:

Thanks for your quick reply.
I tried your code and it works to make the cell "speak" but unfortunatly
the hyperlink function causes the focus to move to cell A1 (which is the
cell I assigned to the hyperlink)
What I really want to do is assign a macro or hyperlink to a "word art"
picture at the top of the spreadsheet that when clicked will delete the
cell that is in focus then move down to the cell below and "read" that
cell. A 2nd "button" would change the formatting of the cell that is in
focus and "read" the cell below (eg push one work art button, labeled
completed, to remove an item from a checklist and read the next item
while pushing a 2nd button, labeled "deferred", to highlight a skipped
item of the checklist while moving on to the next item)
If you can help me that would be greatly appreciated.
Gary Peitzmeier

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


--

Dave Peterson



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

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