Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
HYPERLINKS IN VBA!!
This is what I want to do...I want to be able to create a hyperlink in a
macro AND, the most important part (because I already have successfully created a hyperlink in a macro), RE-LINK the hyperlink to the copied and renamed worksheet. My code is below, it's real basic, but it's all I have so far. I'd REALLY appreciate any help you guys could give me...thanks... Elise Sub Macro1() ' Sheets("Sheet1").Select n = Sheets.Count Sheets("Sheet1").Copy After:=Sheets(n) ActiveSheet.Name = InputBox("Enter the number of the new distributor.") Sheets("Sheet1").Select Range("A11").Select ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:=InputBox("Enter the number of the new distributor.") ' End Sub |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
HYPERLINKS IN VBA!!
Actually you were very, very, close. Just a little tweak:
Sub Macro1() Sheets("Sheet1").Select n = Sheets.Count Sheets("Sheet1").Copy After:=Sheets(n) ActiveSheet.Name = InputBox("Enter the number of the new distributor.") v = ActiveSheet.Name & "!A1" Sheets("Sheet1").Select Range("A11").Select ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _ v, TextToDisplay:=v End Sub -- Gary''s Student - gsnu200733 "Elise148" wrote: This is what I want to do...I want to be able to create a hyperlink in a macro AND, the most important part (because I already have successfully created a hyperlink in a macro), RE-LINK the hyperlink to the copied and renamed worksheet. My code is below, it's real basic, but it's all I have so far. I'd REALLY appreciate any help you guys could give me...thanks... Elise Sub Macro1() ' Sheets("Sheet1").Select n = Sheets.Count Sheets("Sheet1").Copy After:=Sheets(n) ActiveSheet.Name = InputBox("Enter the number of the new distributor.") Sheets("Sheet1").Select Range("A11").Select ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:=InputBox("Enter the number of the new distributor.") ' End Sub |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
HYPERLINKS IN VBA!!
Is there anything I can do to keep the !A1 from showing up after I run the
macro? "Gary''s Student" wrote: Actually you were very, very, close. Just a little tweak: Sub Macro1() Sheets("Sheet1").Select n = Sheets.Count Sheets("Sheet1").Copy After:=Sheets(n) ActiveSheet.Name = InputBox("Enter the number of the new distributor.") v = ActiveSheet.Name & "!A1" Sheets("Sheet1").Select Range("A11").Select ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _ v, TextToDisplay:=v End Sub -- Gary''s Student - gsnu200733 "Elise148" wrote: This is what I want to do...I want to be able to create a hyperlink in a macro AND, the most important part (because I already have successfully created a hyperlink in a macro), RE-LINK the hyperlink to the copied and renamed worksheet. My code is below, it's real basic, but it's all I have so far. I'd REALLY appreciate any help you guys could give me...thanks... Elise Sub Macro1() ' Sheets("Sheet1").Select n = Sheets.Count Sheets("Sheet1").Copy After:=Sheets(n) ActiveSheet.Name = InputBox("Enter the number of the new distributor.") Sheets("Sheet1").Select Range("A11").Select ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:=InputBox("Enter the number of the new distributor.") ' End Sub |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
HYPERLINKS IN VBA!!
Nevermind. I got it! Thanks for your help!!!
"Gary''s Student" wrote: Actually you were very, very, close. Just a little tweak: Sub Macro1() Sheets("Sheet1").Select n = Sheets.Count Sheets("Sheet1").Copy After:=Sheets(n) ActiveSheet.Name = InputBox("Enter the number of the new distributor.") v = ActiveSheet.Name & "!A1" Sheets("Sheet1").Select Range("A11").Select ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _ v, TextToDisplay:=v End Sub -- Gary''s Student - gsnu200733 "Elise148" wrote: This is what I want to do...I want to be able to create a hyperlink in a macro AND, the most important part (because I already have successfully created a hyperlink in a macro), RE-LINK the hyperlink to the copied and renamed worksheet. My code is below, it's real basic, but it's all I have so far. I'd REALLY appreciate any help you guys could give me...thanks... Elise Sub Macro1() ' Sheets("Sheet1").Select n = Sheets.Count Sheets("Sheet1").Copy After:=Sheets(n) ActiveSheet.Name = InputBox("Enter the number of the new distributor.") Sheets("Sheet1").Select Range("A11").Select ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:=InputBox("Enter the number of the new distributor.") ' End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How toi turn-off hyperlinks [excel]? Email hyperlinks pop up ! | Excel Discussion (Misc queries) | |||
Excel Hyperlinks- cell content v. hyperlinks | Excel Discussion (Misc queries) | |||
Hyperlinks | New Users to Excel | |||
If and hyperlinks.... | Excel Discussion (Misc queries) | |||
hyperlinks | Excel Worksheet Functions |