VBA to activate/deactivate hyperlinks in excel

QualEng

New Member
Joined
Aug 15, 2018
Messages
13
Hi All

This is my first go at asking aquestion so apologies to all if I haven't given enough info or messed up insome other way!



The workbook I am having aproblem with is for producing a range of standard quality documents during theNew Product Introduction process.



Within the workbook there is asheet with areas which are hidden until required by the user. The areas on thesheet are hidden/shown by code which changes the colour to the same as thebackground and protects as necessary. I didn't want to close columns or rows asI wanted to maintain the header and size of the sheet and just make each areaappear when called for.



These areas are for data entryand are called for with a button and another button to hide them all again whencreating a new workbook. The hidden areas each contain a hyperlink (these takethe user to other sheets in the workbook for use with the data entered) in atext box (this allows the hyperlink to work when the sheet is protected). Myproblem is that even though the hyperlinks are hidden they are still active andthe cursor shows a hand when passing over.



All the coding works for what Ihave done so I haven’t included any here bur can if it might help, but havespent a long time trying to find a solution to my problem without success. Theonly command that thought might do the job was EnableEvents.True/false but that didn’t work.



Please note that I have had noformal training in VBA and am not a programmer! I just borrow bits of code andstick them together and play with it until it works!



How can I deactivate a hyperlinkwhile it is hidden using VBA or a macro? Any assistance will be very welcome.Thanks very much

 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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