Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default macro does not sheet name

"Todd" wrote:

Hi,


Range("C7").Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _
"'12010'!A61", TextToDisplay:="January"


Never worked with hyperlinks, but I think what you want to do is change SubAddress to:

SubAddress:= "'' & activesheet.name & "'A61"

not 100% sure of the syntax, but if VBA acts like the INDIRECT function, this should work.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default macro does not sheet name

Actually, it should be this:

SubAddress:=ActiveSheet.Name & "!A61"
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 177
Default macro does not sheet name

Thank you! The second way is working.

"Marcotte A" wrote:

Actually, it should be this:

SubAddress:=ActiveSheet.Name & "!A61"

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
Macro to lookup a sheet, number, then display in origonal sheet abbsy3 New Users to Excel 3 November 9th 10 12:19 PM
How to move rows from one sheet to another sheet (macro) Stacey Excel Discussion (Misc queries) 1 December 30th 09 02:52 PM
macro to: Add new sheet, then rename new sheet with todays date Paul Excel Worksheet Functions 3 September 29th 07 03:17 AM
2 questions, copying data from sheet to sheet and assigning macro Boris Excel Worksheet Functions 0 December 16th 04 06:11 PM
excel - macro code to open a protected sheet, enter passowrd, and then protect sheet arunjoshi[_5_] Excel Programming 1 May 2nd 04 03:50 PM


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