vba save as

r_harri1972

New Member
Joined
Sep 23, 2014
Messages
37
i have a worksheet that when i hit the save and print button i want it to be saved as cell H12's value.
H12's value will be the customers name. Sometimes its (1) name or sometimes it is (2) names.
This sheet is a Bill of Lading for shipping. I have a BOL folder in the S: directory which is on the network. Within the BOL folder is a folder for each customer.
For Example: H12 = Eastern Machine & MFG. The folder for them is named Eastern Machine.
i need the save as to save in the eastern machine folder on the s: directory. I would also like for it to save sheet 3 only if possible.

For me: do i need the folder to be named exactly the same as H12's value?

Thanks!!!!!
 

Some videos you may like

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

r_harri1972

New Member
Joined
Sep 23, 2014
Messages
37
Here is my code...
can anyone see a problem as to why it won't work?

Private Sub PRINT_SAVEButton18_Click()


With ActiveSheet
.Copy
ActiveWorkbook.SaveAs Filename:="S:\BOL's\" & .Range("H12").Value & "\" & .Range("H12").Value & .Range("F10").Text & ".xlsx", FileFormat:=51
ActiveWorkbook.Close
End With
End Sub
 

Watch MrExcel Video

Forum statistics

Threads
1,109,028
Messages
5,526,335
Members
409,696
Latest member
EERS

This Week's Hot Topics

Top