J
Jason Hancock
I've got some operational code for my project, and everything works as
long as there are no deviations from the norm. But, we all know
deviations are going to happen. So, I want to be able to create an
If-Then to check if the user does not select a workbook from the
selection screen. Right now the code is:
UF = Application.GetOpenFilename(FileFilter:="XML Files (*.xml)",
Title:="This Weeks Projections for Marc")
Workbooks.Open Filename:=UF
Set wbUF = Workbooks.Open(Filename:=UF)
UFFN = wbUF.Name
Sheets("Marc").Select
Sheets("Marc").Copy After:=Workbooks("Projection
Summary.xls").Sheets("Summary")
Windows(UFFN).Activate
ActiveWindow.Close
Obviously if the user clicks Cancel, I'm going to get error messages, so
what value does the cancel button return that I can use in an If-Then
statement?
long as there are no deviations from the norm. But, we all know
deviations are going to happen. So, I want to be able to create an
If-Then to check if the user does not select a workbook from the
selection screen. Right now the code is:
UF = Application.GetOpenFilename(FileFilter:="XML Files (*.xml)",
Title:="This Weeks Projections for Marc")
Workbooks.Open Filename:=UF
Set wbUF = Workbooks.Open(Filename:=UF)
UFFN = wbUF.Name
Sheets("Marc").Select
Sheets("Marc").Copy After:=Workbooks("Projection
Summary.xls").Sheets("Summary")
Windows(UFFN).Activate
ActiveWindow.Close
Obviously if the user clicks Cancel, I'm going to get error messages, so
what value does the cancel button return that I can use in an If-Then
statement?