Hello All,
I have this macro which copies info from ThisWorkbook to 2 other workbooks opened by the macro. I have been able to work the code and have a new file saved to a folder but I can not get it to save to the folder that ThisWorkbook is in. Any ideas where the problem is?
This comes from a recorded macro that has been modified.
I have this macro which copies info from ThisWorkbook to 2 other workbooks opened by the macro. I have been able to work the code and have a new file saved to a folder but I can not get it to save to the folder that ThisWorkbook is in. Any ideas where the problem is?
This comes from a recorded macro that has been modified.
Code:
Sub Exacta()
'
' Exacta Macro
' Macro recorded 2/27/2009 by David D
'
'
Workbooks.Open Filename:="Z:\Gould Southern Info\GA Kits\Forms & Templates\RFQ ---- to EX.xls"
ThisWorkbook.Activate
Sheets("RFQ to EX BOM Pg 2").Select
Range("A15:F" & Range("B2000").End(xlUp).Row).Select
Selection.Copy
Windows("RFQ ---- to EX.xls").Activate
Sheets("BOM").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Range("A2").Select
ThisWorkbook.Activate
Range("A2").Select
Sheets("RFQ to Exacta PG 1").Select
Columns("A:H").Select
Application.CutCopyMode = False
Selection.Copy
Windows("RFQ ---- to EX.xls").Activate
Sheets("Cover").Select
Columns("A:A").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.Run "ExSaveAs()"
ThisWorkbook.Activate
Workbooks.Open Filename:="Z:\Gould Southern Info\GA Kits\Forms & Templates\RFQ ---- Austin Foam.xls"
ThisWorkbook.Activate
Sheets("Foam Cost").Select
Range("A1:H22").Select
Application.CutCopyMode = False
Selection.Copy
Windows("RFQ ---- Austin Foam.xls").Activate
Sheets("Sheet1").Select
Range("b33").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.Run "AustinSaveAs()"
Range("d56:d59").Select
Application.CutCopyMode = False
Selection.Copy
ThisWorkbook.Activate
Sheets("Foam Cost").Select
Range("c24").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
Sub AustinSaveAs()
ActiveWorkbook.SaveAs Filename:=ThisWorkbook.Path & "\" & "RFQ " & Range("c34") & " " & Range("c37") & ".xls"
End Sub
Sub ExSaveAs()
ActiveWorkbook.SaveAs Filename:=ThisWorkbook.Path & "\" & "RFQ " & Range("c34") & " " & Range("c37") & ".xls"
End Sub