Hello - i have an excel file that has numerous tabs. Each have a name, what i am trying to do is in the main sheet, enter in the tab name so that the info that is copied will paste to the correct tab. see code below - i get an error on the top line. The Tab will change each time i go into the report so i need to be able to enter in my tab name each time and just run the macro.
Sheet2 is my main sheet where the info is at. AE4 is the cell where i have input the tab name
Sub MoveFI()
ws1 = Sheets("Sheet2").Range("AE4").Value
Sheets("Sheet2").Select
Range("A2:B1200").Copy
Sheets("ws1").Select
Range("A2").Select
ActiveSheet.Paste
End Sub
Sheet2 is my main sheet where the info is at. AE4 is the cell where i have input the tab name
Sub MoveFI()
ws1 = Sheets("Sheet2").Range("AE4").Value
Sheets("Sheet2").Select
Range("A2:B1200").Copy
Sheets("ws1").Select
Range("A2").Select
ActiveSheet.Paste
End Sub