R
Rocky Lam
I have a macro save file to c: drive
How do I change to save files to G:\Purchase Order\2004\
Thanks
The NEWORDER macro
Sub NEWORDER()
'
' NEWORDER Macro
'
'Specify the named ranged ORD as the ORDER# and DIRECT, DT, and ORD to
create the variable PTH as the path.
Dim ORDER#, PTH
ORDER# = Range("ORD").Value
PTH = Range("DIRECT").Value & Range("DT").Value & " - " &
(Range("ORD").Value + 1)
'Increase the order number as by 1 and save the workbook capturing the new
order number.
Range("ORD") = ORDER# + 1
ActiveWorkbook.Save
'Save the file as a new order according to the path above.
ActiveWorkbook.SaveAs Filename:=PTH
End Sub
How do I change to save files to G:\Purchase Order\2004\
Thanks
The NEWORDER macro
Sub NEWORDER()
'
' NEWORDER Macro
'
'Specify the named ranged ORD as the ORDER# and DIRECT, DT, and ORD to
create the variable PTH as the path.
Dim ORDER#, PTH
ORDER# = Range("ORD").Value
PTH = Range("DIRECT").Value & Range("DT").Value & " - " &
(Range("ORD").Value + 1)
'Increase the order number as by 1 and save the workbook capturing the new
order number.
Range("ORD") = ORDER# + 1
ActiveWorkbook.Save
'Save the file as a new order according to the path above.
ActiveWorkbook.SaveAs Filename:=PTH
End Sub