Workbook.Close on Worksheet_FollowHyperlink

jbrouse

Active Member
Joined
Apr 28, 2005
Messages
329
Greetings,

I am hoping someone can assist me with this.

I have a workbook that is sent to other users via e-mail (Lotus Notes). All this workbook contains is a hyperlink to another document (This was my way of providing an e-mail link in Lotus Notes since our version does not support inputting links from Excel).

So now, what I would like to do is close the workbook when the link is clicked. I cannot simply call the workbook directly with

Workbook("emailwb").Close

because, by opening it from the e-mail, the first time it will open with the correct file name, but each time after, it will open as a temporary file with a name like ~1485993.

So, can someone please assist me in writing code that will close the workbook after the user has clicked on the hyperlink?

Any assistance would be greatly appreciated.

Thanks!
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

Forum statistics

Threads
1,214,643
Messages
6,120,702
Members
448,980
Latest member
CarlosWin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top