H
Horacio
I have this code to insert a new sheet with the content of the selected
cell.Wat I want now is link the selected cell to their sheet.
Exemple: If the content is "test" I want to link this cell to the new
sheet "test".
Any Help??
Thank you.
Sub InsertSheet()
Sheets("Folha1").Select
Range("A2").Select
Selection.End(xlDown).Select
Selection.Copy
Sheets("Folha2").Select
Range("G2").Select
ActiveSheet.Paste
NewSheetName = Selection.Value
ActiveWorkbook.Sheets("Folha2").Copy
After:=Worksheets(Worksheets.Count)
ActiveSheet.Name = NewSheetName
Range("G2:L2").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Selection.Merge
With Selection.Font
.Name = "Calibri"
.Size = 16
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ThemeColor = xlThemeColorLight1
.TintAndShade = 0
.ThemeFont = xlThemeFontMinor
End With
With Selection.Font
.Color = -16727809
.TintAndShade = 0
End With
Selection.Font.Bold = True
End Sub
cell.Wat I want now is link the selected cell to their sheet.
Exemple: If the content is "test" I want to link this cell to the new
sheet "test".
Any Help??
Thank you.
Sub InsertSheet()
Sheets("Folha1").Select
Range("A2").Select
Selection.End(xlDown).Select
Selection.Copy
Sheets("Folha2").Select
Range("G2").Select
ActiveSheet.Paste
NewSheetName = Selection.Value
ActiveWorkbook.Sheets("Folha2").Copy
After:=Worksheets(Worksheets.Count)
ActiveSheet.Name = NewSheetName
Range("G2:L2").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Selection.Merge
With Selection.Font
.Name = "Calibri"
.Size = 16
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ThemeColor = xlThemeColorLight1
.TintAndShade = 0
.ThemeFont = xlThemeFontMinor
End With
With Selection.Font
.Color = -16727809
.TintAndShade = 0
End With
Selection.Font.Bold = True
End Sub