Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsOtherProgramming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old September 1st, 2004, 03:12 AM
Ian Lowe Ian Lowe is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 2 Ian Lowe User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Excel Macro Problem

From within an Excel macro I am trying to automatically generate a series of HTML links on the 1st Worksheet of an Excel Workbook which point to a variable numer of subsequent worksheets. (See code attached)

The problem I have is that I can easly see how to create links to external locations but can't find the right reference format to point to internal lWorkbook locations. Can any one help?

For i = 2 To Sheets.Count
With Worksheets("Main")
Cells(i + 6, 4).Value = Sheets(i).Name
.Hyperlinks.Add Anchor:=.Cells(i + 6, 4), Address:=Worksheets(i).Name
End With
For rwIndex = 1 To 1000000
With Worksheets(i).Cells(rwIndex, 1)
If .Value = "Total" Then
Worksheets("Main").Cells(i + 6, 6).Value = Worksheets(i).Cells(rwIndex, 6)
Worksheets("Main").Cells(i + 6, 8).Value = Worksheets(i).Cells(rwIndex, 8)
rwIndex = 1000000
End If
End With
Next rwIndex
Next i

Reply With Quote
  #2  
Old September 28th, 2004, 08:51 AM
a9192shark a9192shark is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 12 a9192shark User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 m 14 sec
Reputation Power: 0
Hello,


I have just recorded a macro to insert a hyperlink and this is the code in the macro.

Code:
 	ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _
		"Sheet1!A2", TextToDisplay:="Sheet1!A2"
 


HTH,

Alan.

Reply With Quote
Reply

Viewing: ASP Free ForumsOtherProgramming Help > Excel Macro Problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway