Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Script to add hyperlink to Excel cell containing text

Would like to use Windows Script to add a hyperlink to a cell in Excel:

Example:

The cell contains BE001.TXT. I want to turn that entry into a hyperlink to
\\Server06\C$\Program Files\Veritas\NT\Data\BE001.TXT while displaying only
BE001.TXT in the cell.

Can this be done using Windows Scripting?

Please reply to the group -no emails.

Thanks in advance


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Script to add hyperlink to Excel cell containing text

Hi,
No need of a script, you can use the HYPERLINK( path , displayed_text)
funtion:
Say column A contains the file names, eg: a2: BE001.TXT
-In B2: =HYPERLINK("\\Server06\C$\Program Files\Veritas\NT\Data\" & A2, A2)
-Copy/Paste down this cell along the data
- you can even hide column A now if necessary (select column A, then menu
Format Column Hide)

Regards,
Sebastien
"John Doe" wrote:

Would like to use Windows Script to add a hyperlink to a cell in Excel:

Example:

The cell contains BE001.TXT. I want to turn that entry into a hyperlink to
\\Server06\C$\Program Files\Veritas\NT\Data\BE001.TXT while displaying only
BE001.TXT in the cell.

Can this be done using Windows Scripting?

Please reply to the group -no emails.

Thanks in advance



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Script to add hyperlink to Excel cell containing text

Here is a portion of my script which runs a report against text file backup
logs and puts them in an Excel Spreadsheet.

ElseIf InStr(s, "Job Log: ") < 0 Then
objXL.Cells(Row,Column+6).Value = Mid(s, 10) (this enters the job
log file name BEXXX.TXT)

At this point I want to insert the Hyperlink at Row,Column+7 :
\\Server06\C$\Program Files\Veritas\NT\Data\BE001.TXT

I have a variable in my script (BEFolder) that includes the
\\Server06\C$\Program Files\Veritas\NT\Data\ path since the server
changes depending on the report.

So would something like this work?

objXL.Cells(Row,Column+7).Value = (=HYPERLINK ...BEFolder & (Row,Column+7)

Pardon my lack of knowledge in scripting but I am new to scripting.

Thanks Again



"sebastienm" wrote in message
...
Hi,
No need of a script, you can use the HYPERLINK( path , displayed_text)
funtion:
Say column A contains the file names, eg: a2: BE001.TXT
-In B2: =HYPERLINK("\\Server06\C$\Program Files\Veritas\NT\Data\" & A2,
A2)
-Copy/Paste down this cell along the data
- you can even hide column A now if necessary (select column A, then menu
Format Column Hide)

Regards,
Sebastien
"John Doe" wrote:

Would like to use Windows Script to add a hyperlink to a cell in Excel:

Example:

The cell contains BE001.TXT. I want to turn that entry into a hyperlink
to
\\Server06\C$\Program Files\Veritas\NT\Data\BE001.TXT while displaying
only
BE001.TXT in the cell.

Can this be done using Windows Scripting?

Please reply to the group -no emails.

Thanks in advance





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default Script to add hyperlink to Excel cell containing text

try

objXL.Cells(Row,Column+7).FormulaR1C1 = "=HYPERLINK(""\\Server06\C$\Program
Files\Veritas\NT\Data\"" & RC2,RC2)"
--
Patrick Molloy
Microsoft Excel MVP
---------------------------------
I Feel Great!
---------------------------------
"John Doe" wrote in message
news:wQ2ad.364260$Fg5.215460@attbi_s53...
Here is a portion of my script which runs a report against text file
backup logs and puts them in an Excel Spreadsheet.

ElseIf InStr(s, "Job Log: ") < 0 Then
objXL.Cells(Row,Column+6).Value = Mid(s, 10) (this enters the job
log file name BEXXX.TXT)

At this point I want to insert the Hyperlink at Row,Column+7 :
\\Server06\C$\Program Files\Veritas\NT\Data\BE001.TXT

I have a variable in my script (BEFolder) that includes the
\\Server06\C$\Program Files\Veritas\NT\Data\ path since the server
changes depending on the report.

So would something like this work?

objXL.Cells(Row,Column+7).Value = (=HYPERLINK ...BEFolder & (Row,Column+7)

Pardon my lack of knowledge in scripting but I am new to scripting.

Thanks Again



"sebastienm" wrote in message
...
Hi,
No need of a script, you can use the HYPERLINK( path , displayed_text)
funtion:
Say column A contains the file names, eg: a2: BE001.TXT
-In B2: =HYPERLINK("\\Server06\C$\Program Files\Veritas\NT\Data\" & A2,
A2)
-Copy/Paste down this cell along the data
- you can even hide column A now if necessary (select column A, then menu
Format Column Hide)

Regards,
Sebastien
"John Doe" wrote:

Would like to use Windows Script to add a hyperlink to a cell in Excel:

Example:

The cell contains BE001.TXT. I want to turn that entry into a hyperlink
to
\\Server06\C$\Program Files\Veritas\NT\Data\BE001.TXT while displaying
only
BE001.TXT in the cell.

Can this be done using Windows Scripting?

Please reply to the group -no emails.

Thanks in advance







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Script to add hyperlink to Excel cell containing text

Worked great, thank you very much for the assistance.


"Patrick Molloy" wrote in message
...
try

objXL.Cells(Row,Column+7).FormulaR1C1 =
"=HYPERLINK(""\\Server06\C$\Program Files\Veritas\NT\Data\"" & RC2,RC2)"
--
Patrick Molloy
Microsoft Excel MVP
---------------------------------
I Feel Great!
---------------------------------
"John Doe" wrote in message
news:wQ2ad.364260$Fg5.215460@attbi_s53...
Here is a portion of my script which runs a report against text file
backup logs and puts them in an Excel Spreadsheet.

ElseIf InStr(s, "Job Log: ") < 0 Then
objXL.Cells(Row,Column+6).Value = Mid(s, 10) (this enters the job
log file name BEXXX.TXT)

At this point I want to insert the Hyperlink at Row,Column+7 :
\\Server06\C$\Program Files\Veritas\NT\Data\BE001.TXT

I have a variable in my script (BEFolder) that includes the
\\Server06\C$\Program Files\Veritas\NT\Data\ path since the server
changes depending on the report.

So would something like this work?

objXL.Cells(Row,Column+7).Value = (=HYPERLINK ...BEFolder &
(Row,Column+7)

Pardon my lack of knowledge in scripting but I am new to scripting.

Thanks Again



"sebastienm" wrote in message
...
Hi,
No need of a script, you can use the HYPERLINK( path , displayed_text)
funtion:
Say column A contains the file names, eg: a2: BE001.TXT
-In B2: =HYPERLINK("\\Server06\C$\Program Files\Veritas\NT\Data\" & A2,
A2)
-Copy/Paste down this cell along the data
- you can even hide column A now if necessary (select column A, then
menu
Format Column Hide)

Regards,
Sebastien
"John Doe" wrote:

Would like to use Windows Script to add a hyperlink to a cell in Excel:

Example:

The cell contains BE001.TXT. I want to turn that entry into a
hyperlink to
\\Server06\C$\Program Files\Veritas\NT\Data\BE001.TXT while displaying
only
BE001.TXT in the cell.

Can this be done using Windows Scripting?

Please reply to the group -no emails.

Thanks in advance









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
text changing in hyperlink cell in Excel MLT Excel Discussion (Misc queries) 1 October 11th 08 09:03 PM
How to generate a text file from Excel using a macro or script? Frank Excel Discussion (Misc queries) 1 January 6th 08 05:11 PM
How to generate a text file from Excel using a macro or script? Frank Excel Discussion (Misc queries) 0 January 6th 08 05:11 PM
How to create a hyperlink in excel, using the text in a cell. Leo Excel Worksheet Functions 1 January 29th 05 04:32 AM
Excel 2000/XP script to Excel97 script hat Excel Programming 3 March 2nd 04 03:56 PM


All times are GMT +1. The time now is 11:58 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"