Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 164
Default Changing a Macro

I received this macro awhile back. It works as advertised for the most part.
Unless the data to be converted is in a column other than "L".

What do I need to change to define the convertRng as the range I have selected?


Sub convertToHypers()
Dim convertRng As Range
Set convertRng = Range("L2:L1444")
Dim rng As Range

For Each rng In convertRng
If rng.Value < "" Then
ActiveSheet.Hyperlinks.Add rng, "mailto:" & rng.Value
End If
Next rng

End Sub


--

Regards
Michael Koerner



  #2   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 399
Default Changing a Macro

(1) Change "Set convertRng = Range("L2:L1444")" to "Set convertRng =
Selection"
(2) Select the range of cells you want to work with.
(3) Run the macro.

Ed

"Michael Koerner" wrote in message
...
I received this macro awhile back. It works as advertised for the most

part.
Unless the data to be converted is in a column other than "L".

What do I need to change to define the convertRng as the range I have

selected?


Sub convertToHypers()
Dim convertRng As Range
Set convertRng = Range("L2:L1444")
Dim rng As Range

For Each rng In convertRng
If rng.Value < "" Then
ActiveSheet.Hyperlinks.Add rng, "mailto:" & rng.Value
End If
Next rng

End Sub


--

Regards
Michael Koerner





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Changing a Macro

Sub convertToHypers()
Dim convertRng As Range
'Set convertRng = Range("L2:L1444")
Set convertRng = Selection
Dim rng As Range

For Each rng In convertRng
If rng.Value < "" Then
ActiveSheet.Hyperlinks.Add rng, "mailto:" & rng.Value
End If
Next rng

End Sub

--
Regards,
Tom Ogilvy


"Michael Koerner" wrote in message
...
I received this macro awhile back. It works as advertised for the most

part.
Unless the data to be converted is in a column other than "L".

What do I need to change to define the convertRng as the range I have

selected?


Sub convertToHypers()
Dim convertRng As Range
Set convertRng = Range("L2:L1444")
Dim rng As Range

For Each rng In convertRng
If rng.Value < "" Then
ActiveSheet.Hyperlinks.Add rng, "mailto:" & rng.Value
End If
Next rng

End Sub


--

Regards
Michael Koerner





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 164
Default Changing a Macro

Ed, Tom, thank you very much. greatly appreciated.

--

Regards
Michael Koerner


"Tom Ogilvy" wrote in message
...
Sub convertToHypers()
Dim convertRng As Range
'Set convertRng = Range("L2:L1444")
Set convertRng = Selection
Dim rng As Range

For Each rng In convertRng
If rng.Value < "" Then
ActiveSheet.Hyperlinks.Add rng, "mailto:" & rng.Value
End If
Next rng

End Sub

--
Regards,
Tom Ogilvy


"Michael Koerner" wrote in message
...
I received this macro awhile back. It works as advertised for the most

part.
Unless the data to be converted is in a column other than "L".

What do I need to change to define the convertRng as the range I have

selected?


Sub convertToHypers()
Dim convertRng As Range
Set convertRng = Range("L2:L1444")
Dim rng As Range

For Each rng In convertRng
If rng.Value < "" Then
ActiveSheet.Hyperlinks.Add rng, "mailto:" & rng.Value
End If
Next rng

End Sub


--

Regards
Michael Koerner






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
Changing a Macro for new circumstances Paul S Excel Discussion (Misc queries) 0 January 23rd 07 10:44 AM
Help with changing a Macro Mike Rogers Excel Discussion (Misc queries) 1 March 26th 06 11:51 PM
Help with changing a Macro Mike Rogers Excel Discussion (Misc queries) 0 March 26th 06 11:43 PM
Changing Macro Name? Mike Excel Programming 4 January 25th 05 09:05 PM
Macro for changing tabs Chip Pearson Excel Programming 5 February 12th 04 08:17 PM


All times are GMT +1. The time now is 12:34 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"