View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Matthew Herbert[_3_] Matthew Herbert[_3_] is offline
external usenet poster
 
Posts: 149
Default Macro That doesn't work - Please help

Jay,

I forgot to mention Shortcut Keys in my last post. I would recommend that
you not use native Excel shortcuts as your custom macro shortcut because you
will likely override the native shortcut key when you do so. For example,
Ctrl+z is the shortcut key for Undo, and rather than getting Undo when you
use Ctrl+z, you'll get your macro.

There is a whole host of shortcut keys in Excel, but some common Ctrl+
shortcut keys are as follows: Ctrl+ z, x, c, v, b, n, a, s, d, f, g, h, w,
r, u, i, o, p, and 1.

Best,

Matthew Herbert

"JayLatimer" wrote:

I have a macro which converts urls in a column to the words "Tax Record" but
the macro will not work. When I run the Macro it prompts for Column and then
prompts for sheet name as expected. When valid inputis given to both
questions the Macro ends without error but does not convert the urls in the
column identified into the words "Tax Record"

I would appreicate any help I can get. The Marco is:

Sub chngelink()
'
' chngelink Macro
'
' Keyboard Shortcut: Ctrl+z
Dim MyCol As String
Dim MySht As String
On Error Resume Next
MyCol = InputBox("Enter column LETTER(S)")
MySht = InputBox("Enter sheet name")
Lastrow = Sheets(MySht).Cells(Cells.Rows.Count, MyCol).End(xlUp).Row
For Each c In Sheets(MySht).Range(MyCol & "2:" & MyCol & Lastrow)
c.Hyperlinks(1).TextToDisplay = "Tax record"
Next
End Sub