-
Define String from Cell Cell Value
Hi all
I'm sure someone will take about 2 seconds to solve this but I've been hitting my head against a wall for hours
I'm trying to copy a Worksheet and Rename it based on the Value of a Cell in the Active Sheet when a CommandButton on the Sheet in question is pressed.
[vba]
Private Sub CommandButton1_Click()
Dim MySheetName As String
MySheetName = ActiveSheet.Range("B5") & "Selection Report"
ActiveWorkbook.Sheets("Selection Report").Copy _
after:=ActiveWorkbook.Sheets("Selection Report")
ActiveSheet.Name = MySheetName
End Sub[/vba]
Any help would be geatly apprecaited!
-
Apologies, for some reason when I tried it again it worked perfectly!
Liam\
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules