Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Excel event to determine if link has been added to the document

Hi All,

I am writing a plug-in for excel in Visual Basic. Is there a event that
says that a link has been added in the excel document that I can trap.

Thanks,
Vishal
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Excel event to determine if link has been added to the document

Not specifically. The change event would fire if a cell was edited and you
could check that cell to see if the formula was a link.

--
Regards,
Tom Ogilvy


"Vishal" wrote:

Hi All,

I am writing a plug-in for excel in Visual Basic. Is there a event that
says that a link has been added in the excel document that I can trap.

Thanks,
Vishal

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Excel event to determine if link has been added to the documen

Hi Tom,

Thats correct. I used the worksheet and workbook events to achieve the
same effect.

Also finding if the formula is a link involves parsing the formula (Can
be done using linksource)? Also if a link is deleted then how can I find that
link is deleted (What the previous value is and what the current value is)?

Best Regards,
Vishal

"Tom Ogilvy" wrote:

Not specifically. The change event would fire if a cell was edited and you
could check that cell to see if the formula was a link.

--
Regards,
Tom Ogilvy


"Vishal" wrote:

Hi All,

I am writing a plug-in for excel in Visual Basic. Is there a event that
says that a link has been added in the excel document that I can trap.

Thanks,
Vishal

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Excel event to determine if link has been added to the documen

Linksources will give you all the links, so you can maintain a list and
identify if there was an addition or deletion.

I can't think of any other reason a formula would contain a '[' (if it
doesn't have a double quote) so

if Target.HasFormula and instr(1,target.formula,"[",vbTextcompare) and _
instr(1,target.formula,chr(34),vbTextcompare) = 0 then
' link here

--
Regards,
Tom Ogilvy


"Vishal" wrote:

Hi Tom,

Thats correct. I used the worksheet and workbook events to achieve the
same effect.

Also finding if the formula is a link involves parsing the formula (Can
be done using linksource)? Also if a link is deleted then how can I find that
link is deleted (What the previous value is and what the current value is)?

Best Regards,
Vishal

"Tom Ogilvy" wrote:

Not specifically. The change event would fire if a cell was edited and you
could check that cell to see if the formula was a link.

--
Regards,
Tom Ogilvy


"Vishal" wrote:

Hi All,

I am writing a plug-in for excel in Visual Basic. Is there a event that
says that a link has been added in the excel document that I can trap.

Thanks,
Vishal

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Excel event to determine if link has been added to the documen

Thanks a lot Tom. This was very helpful.

Best Regards,
Vishal

"Tom Ogilvy" wrote:

Linksources will give you all the links, so you can maintain a list and
identify if there was an addition or deletion.

I can't think of any other reason a formula would contain a '[' (if it
doesn't have a double quote) so

if Target.HasFormula and instr(1,target.formula,"[",vbTextcompare) and _
instr(1,target.formula,chr(34),vbTextcompare) = 0 then
' link here

--
Regards,
Tom Ogilvy


"Vishal" wrote:

Hi Tom,

Thats correct. I used the worksheet and workbook events to achieve the
same effect.

Also finding if the formula is a link involves parsing the formula (Can
be done using linksource)? Also if a link is deleted then how can I find that
link is deleted (What the previous value is and what the current value is)?

Best Regards,
Vishal

"Tom Ogilvy" wrote:

Not specifically. The change event would fire if a cell was edited and you
could check that cell to see if the formula was a link.

--
Regards,
Tom Ogilvy


"Vishal" wrote:

Hi All,

I am writing a plug-in for excel in Visual Basic. Is there a event that
says that a link has been added in the excel document that I can trap.

Thanks,
Vishal

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
PASTE LINK option not available when I select PASTE SPECIAL to link an image in Excel to a Word document. tln Links and Linking in Excel 0 April 22nd 07 04:28 PM
How to get the leading zero's added in a document Sam Excel Worksheet Functions 3 October 17th 06 11:21 PM
add event to controls added in runtime Brotha lee Excel Programming 1 May 21st 05 10:32 AM
Event procedures for controls added with CreateEventProc John Austin[_6_] Excel Programming 7 March 24th 05 03:21 PM
Event procedures for controls added with CreateEventProc John Austin[_5_] Excel Programming 0 March 12th 05 09:33 PM


All times are GMT +1. The time now is 02:15 AM.

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"