473,395 Members | 1,379 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Change Hyperlink Subaddress in Specified Range

Hi,

I have a macro that adds a row on my summary page, then adds a worksheet where the detail data will be entered for that row. I add the row by copying the row above it and inserting below. The only things i need to change are the subaddresses of all the hyperlinks that were copied down. My problem is that when I change the subaddress for the new row, it always changes the subaddresses of the row(s) above (or any other row with the same subaddress as the new row) even though I am only calling out that range. Here is my code:

Range("G" & CO_Total_Row - 1 & ":" & "AQ" & CO_Total_Row - 1).Select
Dim Old_Hyperlink_Address As String
Old_Hyperlink_Address = "'CO" & Num_COs - 1 & "'!C1"
Dim New_Hyperlink_Address As String
New_Hyperlink_Address = "'CO" & Num_COs + 1 & "'!C1"
Dim hLink As Hyperlink
For Each hLink In Selection.Hyperlinks
hLink.SubAddress = New_Hyperlink_Address
Next hLink

Anyone have an idea why this doesn't work correctly?
Jul 24 '08 #1
0 1080

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: laura | last post by:
I am writing an intranet and want to be able to hyperlink to all files within a specific folder AND it's subfolders. Whilst I can hyperlink to the files in the specified folder AND I can also...
6
by: dog | last post by:
Does anyone know how to use a hyperlink in MS Access (I'm using 97) to open a report or form within the same database? I have a form in my database, I have put a label on it, some text, and when...
9
by: RA | last post by:
While dynamically creating the table; I am adding a hyperlink as a TableCell where text is "Delete". Initially it is disabled and if a checkbox is selected from a table then it gets enabled. Even...
7
by: Bob Sanderson | last post by:
I have a php page which contains the code: echo "<tr>"; echo "<th>$JobNumber</th>"; echo "<td>$Description</td>"; echo "<td>$NSN</td>"; echo "<td>$Manufacturer</td>"; echo...
2
by: Keith Wilby | last post by:
A2003, XP Pro. I have a text box on a form. The text box is bound to a hyperlink field. I want to use the contents of the text box in code so I'm assigning the contents to a string variable. ...
3
by: keithb | last post by:
Using a GridView, I get a "Specified cast is not valid" error when binding the Visible propery of a hyperlink control to a DataTable text field. The error goes away if I replace the data binding...
4
torquehero
by: torquehero | last post by:
hi, I am working with dreamweaver MX 2004. The problem is with Link colors (text). In page properties I have specified the link color, visited links, active links as #000000 and rollover links as...
5
by: NJonge01 | last post by:
Greetings, I've read some great advice on similar topics, just nothing matching exactly what I'm trying I'm pretty close I think on making this work, but note quite there. I want to print a...
3
by: Nathan Sokalski | last post by:
I am using the ImageUrl property of the HyperLink control. My image is large, so I am setting the width/height attributes, but when it renders the width/height attributes are in the <atag rather...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.