LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jay Jay is offline
external usenet poster
 
Posts: 671
Default 65532-65536:Hyperlinks

Hi all €“

Excel 2003/WinXP Pro SP2. Im trying to convert a column of cell address
strings into hyperlinks. The column has a header row, but is otherwise
completely full with 65535 cell address strings down to row 65536. The code
below loops through all but the last 5 rows of the column. It will not
convert the address strings in rows 65532-65536 to hyperlinks (it stalls with
a runtime error €˜1004 when trying to convert the cell in row 65532).

Im curious to know if anyone can repeat this behavior or if it is isolated
to my system.

---
Thanks in advance for taking a look,
Jay

Note1: When the loop index is altered to arbitrarily operate on the last 50
or so rows of the worksheet, all 50 cell addresses convert properly to
hyperlinks with no runtime error. So, its not the row number that precludes
conversion.

Note 2: Also, the i=1 to 65535 loop stalls in the same place (at i=65531)
regardless of the number of other programs I have open or the number of
sheets in the workbook. It doesnt appear to be related to gross memory
resources because Ive run the procedure with a lot of programs open and
after a reboot with just a single-sheet workbook open with equivalent error
results.
---------------------------
A. The Code
Sub hyptest()
'Convert cell addresses to hyperlinks
idim = 65535
With Worksheets(1)
If idim 0 Then
For i = 1 To idim
lnk_address = ""
lnk_SubAddress = "'" & .Cells(i + 1, 2).Text & "'!" & _
.Cells(i + 1, 4).Text
lnk_display = .Cells(i + 1, 4).Text
ActiveSheet.Hyperlinks.Add Anchor:=.Cells(i + 1, 4), _
Address:=lnk_address, _
SubAddress:=lnk_SubAddress, TextToDisplay:=lnk_display
Next i
End If
End With
End Sub

B. To recreate the workbook:
1. Make a header row in Worksheet(1) of a blank workbook with some header
labels:
A1: €œH1€ B1: €œH2€ C1: €œH3€ D1: €œH4€

2. In Column A, fill rows 2-65536 with consecutive integers, 1-65535.

3. Fill Column B with the arbitrary string €œDGSheet€ (same entry for all
65535 cells).

4. Leave Column C blank (except for the header label).

5. Fill Column D with an arbitrary cell address using the following formula
in D2:
=Address(A2,7)
Copy/Paste this formula downward to the last row of the worksheet. Convert
the entire column to values with Copy/PasteSpecial Values.

6. Run Sub hyptest() and see what happens.

--
Thanks again,
Jay
 
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
more than 65536 rows Christopher Naveen[_2_] Excel Discussion (Misc queries) 13 September 21st 07 04:42 PM
Row Limit 65536 Mainframer at Heart Excel Discussion (Misc queries) 6 January 29th 07 04:34 AM
Help with 65536 macro kevinz Excel Discussion (Misc queries) 6 April 2nd 06 02:50 AM
Removing A - Z and 1 - 65536 sharkfoot[_3_] Excel Programming 2 March 14th 06 08:16 PM
More than 65536 to new sheet Pav Excel Worksheet Functions 1 January 13th 05 06:46 PM


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