Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 921
Default code for Allow Insert Hyperlink

Hi All,
Please help me with the VBA to Allow Insert Hyperlinks from an unlocked cell
in a protected sheet.

The worksheet is protected and all cells are unlocked. It has code to lock
rows as a Final cell is changed to Yes. I also have code in ThisWorkbook that
hides columns based on current user. What happens is, in the course of
opening the file, the Allow Insert Hyperlinks is set to not checked,
regardless of its status when the file is saved. So I need to add code to set
Allow Insert Hyperlink to Yes. To make it clearer, below is the process:
ThisWorkbook
gets current user
unprotects worksheet
unhides all columns
hides columns (based on current user)
needs to set Allow Insert Hyperlinks<<<

protects sheet

Thanks for any help.
Jeff
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 489
Default code for Allow Insert Hyperlink

This code will protect the activesheet and allow inserting of hyperlinks.

ActiveSheet.Protect Password:= "password", AllowInsertingHyperlinks:=True

If you want to test if AllowInsertingHyperlinks is true run this code.

If ActiveSheet.Protection.AllowInsertingHyperlinks = True Then
Msgbox "AllowInsertingHyperlinks = True"
End If

Read the VBA help on "Allow Hyperlinks". Hope this helps! If so, let me
know, click "YES" below.

--
Cheers,
Ryan


"Jeff" wrote:

Hi All,
Please help me with the VBA to Allow Insert Hyperlinks from an unlocked cell
in a protected sheet.

The worksheet is protected and all cells are unlocked. It has code to lock
rows as a Final cell is changed to Yes. I also have code in ThisWorkbook that
hides columns based on current user. What happens is, in the course of
opening the file, the Allow Insert Hyperlinks is set to not checked,
regardless of its status when the file is saved. So I need to add code to set
Allow Insert Hyperlink to Yes. To make it clearer, below is the process:
ThisWorkbook
gets current user
unprotects worksheet
unhides all columns
hides columns (based on current user)
needs to set Allow Insert Hyperlinks<<<

protects sheet

Thanks for any help.
Jeff

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 921
Default code for Allow Insert Hyperlink

Super, Ryan. Thank you.

"Ryan H" wrote:

This code will protect the activesheet and allow inserting of hyperlinks.

ActiveSheet.Protect Password:= "password", AllowInsertingHyperlinks:=True

If you want to test if AllowInsertingHyperlinks is true run this code.

If ActiveSheet.Protection.AllowInsertingHyperlinks = True Then
Msgbox "AllowInsertingHyperlinks = True"
End If

Read the VBA help on "Allow Hyperlinks". Hope this helps! If so, let me
know, click "YES" below.

--
Cheers,
Ryan


"Jeff" wrote:

Hi All,
Please help me with the VBA to Allow Insert Hyperlinks from an unlocked cell
in a protected sheet.

The worksheet is protected and all cells are unlocked. It has code to lock
rows as a Final cell is changed to Yes. I also have code in ThisWorkbook that
hides columns based on current user. What happens is, in the course of
opening the file, the Allow Insert Hyperlinks is set to not checked,
regardless of its status when the file is saved. So I need to add code to set
Allow Insert Hyperlink to Yes. To make it clearer, below is the process:
ThisWorkbook
gets current user
unprotects worksheet
unhides all columns
hides columns (based on current user)
needs to set Allow Insert Hyperlinks<<<
protects sheet

Thanks for any help.
Jeff

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
Hyperlink Insert Pane (Last used) Andre Excel Discussion (Misc queries) 0 November 30th 06 09:04 AM
How do I insert the value of a cell into a Hyperlink CW2 James Reed Excel Discussion (Misc queries) 1 March 4th 06 04:25 PM
Insert Hyperlink Nigel Excel Programming 4 January 10th 06 01:31 AM
insert hyperlink Gary''s Student Excel Discussion (Misc queries) 0 November 19th 05 02:13 PM
Insert hyperlink Todd Huttenstine Excel Programming 1 November 1st 04 12:26 AM


All times are GMT +1. The time now is 04:51 PM.

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

About Us

"It's about Microsoft Excel"