finAnalysis
New Member
- Joined
- Oct 13, 2021
- Messages
- 12
- Office Version
- 365
- Platform
- Windows
VBA Code:
Sub Deals_Approved()
Dim Deals_Approved As Variant
Dim ws As Worksheet
Dim wb As Workbook
Sheets("Monthly P&L").Select
ActiveSheet.Range("A2").Select
Selection.Copy
MsgBox ("Select Deal Sheet from Desktop")
'This will direct the user to select the Deal log that way the folder can be moved and this doesn't break'
Deals_Approved = Application.GetOpenFilename(FileFilter:="Excel Files,*.xl*;*.xm*")
If Deals_Approved <> False Then
Workbooks.Open Filename:=Deal_Approved
End If
Sheets("Approved").Select
'If headers change and tab names change this argument and the next one will break'
Range("A1").End(xlDown).Select
ActiveCell.Offset(1).Select
'Moves down one cell for the next time the macro is run'
PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
ActiveWorkbook.Close savechanges:=True
ThisWorkbook.Activate
Sheets("FinancialModel").Activate
ActiveSheet.Range("A1").Select
MsgBox ("Deal Sheet has been updated!")
End Sub
Last edited by a moderator: