Hi all,
I have a spreadsheet which will fill columns based on data from a number of other worksheets. For each row, there are three different workbooks to draw data from.
I have a macro that will prompt the user to browse to a file to open, it will then manipulate and copy the data into the main workbook.
The only problem I have now is that I want to close the workbook when the macro has finished.
Here is my code:
Sub ImportVEESData()
Dim strPath As String
Dim vntFile As Variant
'Browse to data file using prompt
strPath = "R:\Test Operations\Emissions\Processed Data 14-11-08 onwards\SULEV VEES analysis\SULEV Hot Bag 3 Full Gage R and R 4 March 2009 on\"
ChDrive strPath
vntFile = Application.GetOpenFilename("All Files *.*,*.*")
If vntFile = False Then Exit Sub
Workbooks.Open vntFile
ActiveSheet.Select
'grab values from this open sheet
Windows("ULEV3 Gauge R&R Summary Sheet - Bag 3.xls").Activate
'paste values into sheet
End Sub
Any ideas?
Bookmarks