Hello
Long time user, first time poster.
I am using Excel 2010.
I am currently trying to create a Macro that will do the following.
Open a workbook based on text written in cell
Copy all tabs from the opened workbook
Paste as values
Then save as a new workbook, also if possible from a value use a cell to determine the the file name and file path where it will be saved.
I currently have the following for opening the MMA
Sub OpenWorkbook()
Dim varCellvalue As String
varCellvalue = Range("B1").Value
Workbooks.Open "\\P:\Group Accounts\2015 MMA\" & varCellvalue & ".xls"
End Sub
However when I add any further code for copying it uses the original workbook rather than the one that has just been opened.
Any help on this would be greatly appreciated, please let me know if I can provide any further information.
Long time user, first time poster.
I am using Excel 2010.
I am currently trying to create a Macro that will do the following.
Open a workbook based on text written in cell
Copy all tabs from the opened workbook
Paste as values
Then save as a new workbook, also if possible from a value use a cell to determine the the file name and file path where it will be saved.
I currently have the following for opening the MMA
Sub OpenWorkbook()
Dim varCellvalue As String
varCellvalue = Range("B1").Value
Workbooks.Open "\\P:\Group Accounts\2015 MMA\" & varCellvalue & ".xls"
End Sub
However when I add any further code for copying it uses the original workbook rather than the one that has just been opened.
Any help on this would be greatly appreciated, please let me know if I can provide any further information.