Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Macro will not work - Please help

I have a macro which converts urls in a column to the words "Tax Record" but
the macro will not work. I would appreicate any help I can get. The Marco is:

Sub chngelink()
'
' chngelink Macro
'
' Keyboard Shortcut: Ctrl+z
Sub ChangelinkT()
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

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default Macro will not work - Please help

hi
you have two line begining with sub but only one end sub. are you getting an
error message about "expected end sub"?
remove one on the sub lines and rerun the macro.

Regards
FSt1

"JayLatimer" wrote:

I have a macro which converts urls in a column to the words "Tax Record" but
the macro will not work. I would appreicate any help I can get. The Marco is:

Sub chngelink()
'
' chngelink Macro
'
' Keyboard Shortcut: Ctrl+z
Sub ChangelinkT()
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

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,346
Default Macro will not work - Please help

Hi,

In addition to the earlier comment let me add that using Ctr+z is not a good
idea, it will work but that shortcut key is Excel Undo command, which you
loose by assigning lower case z. I would recommend Ctrl+Z.

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"JayLatimer" wrote:

I have a macro which converts urls in a column to the words "Tax Record" but
the macro will not work. I would appreicate any help I can get. The Marco is:

Sub chngelink()
'
' chngelink Macro
'
' Keyboard Shortcut: Ctrl+z
Sub ChangelinkT()
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

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Macro will not work - Please help

Hi,
I got rid of the additional sub line but the Macro still doesn/t work. As a
matter of fact I do not get any error message either. It asks for the Column
and then the sheet. WHen supplied whit the information nothing happens (url's
are not transformed in the column. Do you have any additional suggestions?

"FSt1" wrote:

hi
you have two line begining with sub but only one end sub. are you getting an
error message about "expected end sub"?
remove one on the sub lines and rerun the macro.

Regards
FSt1

"JayLatimer" wrote:

I have a macro which converts urls in a column to the words "Tax Record" but
the macro will not work. I would appreicate any help I can get. The Marco is:

Sub chngelink()
'
' chngelink Macro
'
' Keyboard Shortcut: Ctrl+z
Sub ChangelinkT()
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

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Macro will not work - Please help

Hi,
I got rid of the additional sub line but the Macro still doesn/t work. As a
matter of fact I do not get any error message either. It asks for the Column
and then the sheet. WHen supplied whit the information nothing happens (url's
are not transformed in the column. Do you have any additional suggestions?


"Shane Devenshire" wrote:

Hi,

In addition to the earlier comment let me add that using Ctr+z is not a good
idea, it will work but that shortcut key is Excel Undo command, which you
loose by assigning lower case z. I would recommend Ctrl+Z.

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"JayLatimer" wrote:

I have a macro which converts urls in a column to the words "Tax Record" but
the macro will not work. I would appreicate any help I can get. The Marco is:

Sub chngelink()
'
' chngelink Macro
'
' Keyboard Shortcut: Ctrl+z
Sub ChangelinkT()
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

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
Macro to update a column in a work based on another work sheet WickerMan New Users to Excel 1 December 4th 09 12:58 PM
Macro works Macro does not work Wanna Learn Excel Discussion (Misc queries) 4 March 24th 08 12:51 PM
Why Won't This Macro Work? Pausert of Nikkeldepaiin Excel Discussion (Misc queries) 7 February 4th 08 01:05 PM
how to get a macro to work Danny Excel Discussion (Misc queries) 8 August 20th 07 01:30 PM
how do you get (end down) to work in a macro? lcx2 Excel Worksheet Functions 1 March 24th 05 08:15 AM


All times are GMT +1. The time now is 06:02 AM.

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

About Us

"It's about Microsoft Excel"