ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Adding a function to strip the address from a hyperlink (https://www.excelbanter.com/excel-programming/337376-adding-function-strip-address-hyperlink.html)

Barb Reinhardt

Adding a function to strip the address from a hyperlink
 
I somehow added a function to a workbook that strips the address from a
hyperlink. It's now resident in the workbook. I'm not sure how I did it.
What I'd like to do now is

1) Create the function so that I can access it from every workbook.
2) Delete it from the workbooks that it's already in.

Can someone assist?

Thanks in advance,
Barb Reinhardt

Tom Ogilvy

Adding a function to strip the address from a hyperlink
 
You would need to find the function in the code modules and remove it.

You would need to put it in another workbook and make that workbook and
addin.

then load the addin.

Then the function should be available to all workbooks opened in your
install of excel.

--
Regards,
Tom Ogilvy


"Barb Reinhardt" wrote in message
...
I somehow added a function to a workbook that strips the address from a
hyperlink. It's now resident in the workbook. I'm not sure how I did

it.
What I'd like to do now is

1) Create the function so that I can access it from every workbook.
2) Delete it from the workbooks that it's already in.

Can someone assist?

Thanks in advance,
Barb Reinhardt




Barb Reinhardt

Adding a function to strip the address from a hyperlink
 
Thanks. I've removed the code modules from the affected workbooks, but can't
seem to get the code to work now. This is what I'm "reusing" and it's
giving me a 0 (zero) when there is a hyperlink.

Function GetAddress(HyperlinkCell As Range)
GetAddress = Replace _
(HyperlinkCell.Hyperlinks(1).Address, "mailto:", "")
End Function

I lifted this, so am not sure what to do next.

Thanks!

Barb Reinhardt

"Tom Ogilvy" wrote:

You would need to find the function in the code modules and remove it.

You would need to put it in another workbook and make that workbook and
addin.

then load the addin.

Then the function should be available to all workbooks opened in your
install of excel.

--
Regards,
Tom Ogilvy


"Barb Reinhardt" wrote in message
...
I somehow added a function to a workbook that strips the address from a
hyperlink. It's now resident in the workbook. I'm not sure how I did

it.
What I'd like to do now is

1) Create the function so that I can access it from every workbook.
2) Delete it from the workbooks that it's already in.

Can someone assist?

Thanks in advance,
Barb Reinhardt





Tom Ogilvy

Adding a function to strip the address from a hyperlink
 
I can't reproduce getting a zero. I moved the function to an addin and
loaded the addin, but the original workbook had problems recognizing the
function (a new workbook had no problem and it worked fine). In the
original workbook, I had to put in

=TestAddin.xla!GetAddress(A1)

to avoid the #Name error. I believe this is because even though the the
function has been deleted, it is still remembered. This might be cleared up
by closing the original workbook and reopening it, but since I hadn't save
it, I didn't test that.

--
Regards,
Tom Ogilvy

"Barb Reinhardt" wrote in message
...
Thanks. I've removed the code modules from the affected workbooks, but

can't
seem to get the code to work now. This is what I'm "reusing" and it's
giving me a 0 (zero) when there is a hyperlink.

Function GetAddress(HyperlinkCell As Range)
GetAddress = Replace _
(HyperlinkCell.Hyperlinks(1).Address, "mailto:", "")
End Function

I lifted this, so am not sure what to do next.

Thanks!

Barb Reinhardt

"Tom Ogilvy" wrote:

You would need to find the function in the code modules and remove it.

You would need to put it in another workbook and make that workbook and
addin.

then load the addin.

Then the function should be available to all workbooks opened in your
install of excel.

--
Regards,
Tom Ogilvy


"Barb Reinhardt" wrote in

message
...
I somehow added a function to a workbook that strips the address from

a
hyperlink. It's now resident in the workbook. I'm not sure how I

did
it.
What I'd like to do now is

1) Create the function so that I can access it from every workbook.
2) Delete it from the workbooks that it's already in.

Can someone assist?

Thanks in advance,
Barb Reinhardt







Barb Reinhardt

Adding a function to strip the address from a hyperlink
 
I got it working. I'm still a bit confused on some issues, but got it working.

Thanks,
Barb Reinhardt

"Tom Ogilvy" wrote:

I can't reproduce getting a zero. I moved the function to an addin and
loaded the addin, but the original workbook had problems recognizing the
function (a new workbook had no problem and it worked fine). In the
original workbook, I had to put in

=TestAddin.xla!GetAddress(A1)

to avoid the #Name error. I believe this is because even though the the
function has been deleted, it is still remembered. This might be cleared up
by closing the original workbook and reopening it, but since I hadn't save
it, I didn't test that.

--
Regards,
Tom Ogilvy

"Barb Reinhardt" wrote in message
...
Thanks. I've removed the code modules from the affected workbooks, but

can't
seem to get the code to work now. This is what I'm "reusing" and it's
giving me a 0 (zero) when there is a hyperlink.

Function GetAddress(HyperlinkCell As Range)
GetAddress = Replace _
(HyperlinkCell.Hyperlinks(1).Address, "mailto:", "")
End Function

I lifted this, so am not sure what to do next.

Thanks!

Barb Reinhardt

"Tom Ogilvy" wrote:

You would need to find the function in the code modules and remove it.

You would need to put it in another workbook and make that workbook and
addin.

then load the addin.

Then the function should be available to all workbooks opened in your
install of excel.

--
Regards,
Tom Ogilvy


"Barb Reinhardt" wrote in

message
...
I somehow added a function to a workbook that strips the address from

a
hyperlink. It's now resident in the workbook. I'm not sure how I

did
it.
What I'd like to do now is

1) Create the function so that I can access it from every workbook.
2) Delete it from the workbooks that it's already in.

Can someone assist?

Thanks in advance,
Barb Reinhardt








All times are GMT +1. The time now is 05:23 PM.

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