Hi Chris,
You are missing an ampersand before the linebreak character, try:
ThisWorkbook.SaveAs filename:=Range("B1").Value & "\" & _
Range("B2").Value & ".xls"
---
Regards,
Norman
"Chris" wrote in message
...
Public Sub save1()
ThisWorkbook.SaveAs filename:=Range("B1").Value & "\" _
Range("B2").Value & ".xls"
End Sub
whats wrong with this. i cant figure it out. bit of a novice you see
----- Chip Pearson wrote: -----
Chris,
If the folder name is in B1 and the file name is in B2, use code
like
ThisWorkbook.SaveAs filename:=Range("B1").Value & "\" _
Range("B2").Value & ".xls"
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"Chris" wrote in message
...
I want to create a macro to save a document as a number i use
for a cell reference (ie cell B2 = 18112 so i want the document
to be called 18112.xls) Also i have a folder with this reference
to start with can excel be programed to find this folder and use
it to save in.
Cheers