G
Guest
With the code below I open a student file and do a error check to grade.
How do I move the workbook after correction to a new folder one level deeper
in the directory?
Move to "L:\OFFICE SKILLS\STUDENT DATA ENTRY" & _
"\Corrected\Dave S\Data Entry GRP#_3.xls"
Then if I can get the file moved I no longer need the original.
The problem seems to be the fact that I use the "GetOpenFileName"
But I use this as the file name changes each depending on the student
and thier progress.
Unsure how to modify the value returned from the GetOpenFileName command.
Private Sub CommandButton3_Click()
SwitchBoard.Hide
FName = Application.GetOpenFilename _
(filefilter:="Excel Files (*.xls),*.xls")
Workbooks.Open (FName)
Worksheets("ERROR REPORT").Activate
Calculate
' PRINT
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
' DISPLAY
'ActiveWindow.SelectedSheets.PrintPreview
' Print or Display.
Worksheets("Data Entry").Activate
Worksheets("Data Entry").Range("A1").Select
ActiveWorkbook.Close SaveChanges:=False
SwitchBoard.Show
End Sub
How do I move the workbook after correction to a new folder one level deeper
in the directory?
Move to "L:\OFFICE SKILLS\STUDENT DATA ENTRY" & _
"\Corrected\Dave S\Data Entry GRP#_3.xls"
Then if I can get the file moved I no longer need the original.
The problem seems to be the fact that I use the "GetOpenFileName"
But I use this as the file name changes each depending on the student
and thier progress.
Unsure how to modify the value returned from the GetOpenFileName command.
Private Sub CommandButton3_Click()
SwitchBoard.Hide
FName = Application.GetOpenFilename _
(filefilter:="Excel Files (*.xls),*.xls")
Workbooks.Open (FName)
Worksheets("ERROR REPORT").Activate
Calculate
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
' DISPLAY
'ActiveWindow.SelectedSheets.PrintPreview
' Print or Display.
Worksheets("Data Entry").Activate
Worksheets("Data Entry").Range("A1").Select
ActiveWorkbook.Close SaveChanges:=False
SwitchBoard.Show
End Sub