Hi! I am trying to create a vba macro to select a file, then open, and use that file to add in an empty column (between B and C).
I am able to get it, so I can select the file, but not getting it to work to use that file and open it.
Any ideas what I'm doing wrong?
I am able to get it, so I can select the file, but not getting it to work to use that file and open it.
Any ideas what I'm doing wrong?
VBA Code:
Sub CopyWorkbook()
Dim NewFN As Workbook
Dim curWorkbook As Workbook
'
'-----------------------------------------------------------'
' Request New Excel File
'
NewFFN = Application.GetOpenFilename(Title:="Please Select File")
If NewFFN = False Then
MsgBox "Macro Terminated Due to No File Selected"
Exit Sub
Else
Workbooks.Open Filename:=NewFFN
End If
'Set NewFN = ActiveWorkbook
'
'-----------------------------------------------------------
Application.Calculation = xlCalculationAutomatic
Workbooks.Open NewFFN
'With Workbooks.Open(NewFN)
'CloseThisWorkbook
MsgBox "No valid file name was supplied.", _
vbCritical, "Can't rename"
End Sub