PC Review


Reply
Thread Tools Rate Thread

code for Allow Insert Hyperlink

 
 
Jeff
Guest
Posts: n/a
 
      11th Mar 2010
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 With Quote
 
 
 
 
Ryan H
Guest
Posts: n/a
 
      11th Mar 2010
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 With Quote
 
Jeff
Guest
Posts: n/a
 
      11th Mar 2010
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I insert a Hyperlink command from code in Access 2007 raveica Microsoft Access VBA Modules 0 19th Oct 2009 07:19 PM
Insert Hyperlink: wrong hyperlink in outlook web access =?Utf-8?B?UGF0cmlrIEx1Y2E=?= Microsoft Outlook Discussion 1 14th Jul 2007 12:11 AM
Can't insert file into a contact using Insert as Hyperlink =?Utf-8?B?R0RDcm9zcw==?= Microsoft Outlook Discussion 0 12th Oct 2006 08:38 PM
Set target frame in hyperlink created by insert hyperlink ctrl =?Utf-8?B?QmlnU2t5MTgy?= Microsoft Powerpoint 1 31st Aug 2006 10:49 PM
vba code that insert a hyperlink file in the body of message gabriel Microsoft Outlook VBA Programming 3 24th Apr 2006 01:51 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:12 PM.