I have a script that creates and names a new sheet and also adds information to a second sheet. I would like to have link on the second sheet to the newly created work sheet here is what I currently have
This piece adds the Header name on the page. The txtTerm.Value is also the name of the new sheet.
.Range("A1").Value = txtTerm.Value
I ran a macro to see if I could see how to combine the two but that didnt help much here is the result of the macro
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _
"'Fall 2014'!A1", TextToDisplay:="Fall 2014"
I tried to combine them with no luck
.Range("A1").Value = ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _
"'txtTerm.Value'!A1", TextToDisplay:= txtTerm.Value
Just not sure what I can get rid of and what needs to be kept well actually I am lost on this one.
This piece adds the Header name on the page. The txtTerm.Value is also the name of the new sheet.
.Range("A1").Value = txtTerm.Value
I ran a macro to see if I could see how to combine the two but that didnt help much here is the result of the macro
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _
"'Fall 2014'!A1", TextToDisplay:="Fall 2014"
I tried to combine them with no luck
.Range("A1").Value = ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _
"'txtTerm.Value'!A1", TextToDisplay:= txtTerm.Value
Just not sure what I can get rid of and what needs to be kept well actually I am lost on this one.