Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
text changing in hyperlink cell in Excel | Excel Discussion (Misc queries) | |||
How to generate a text file from Excel using a macro or script? | Excel Discussion (Misc queries) | |||
How to generate a text file from Excel using a macro or script? | Excel Discussion (Misc queries) | |||
How to create a hyperlink in excel, using the text in a cell. | Excel Worksheet Functions | |||
Excel 2000/XP script to Excel97 script | Excel Programming |