Good afternoon,
I am trying to create a macro that will grab a inactive/hidden worksheet and move it to another existing Excel file, then rename that new sheet according to a cell value.
I tried searching - and this comes up as something close, but it prompts to ask what name should be assigned, while I want it to be renamed just accordingly to one of the cells. It also copies the active worksheet rather than another predesignated ws. Also, it copies the ws to a new file, rather than an existing one.
![]()
Sub testerer() Dim ws As Worksheet Set ws = ActiveSheet Dim s As String s = InputBox("What would you like to name the new sheet?") ws.Name = s End Sub Sub testerest() Dim ws As Worksheet Set ws = ActiveSheet On Error Resume Next ws.Name = [A3].Value End Sub
Bookmarks