help with filepath

  • Thread starter Thread starter Brian Thompson via OfficeKB.com
  • Start date Start date
B

Brian Thompson via OfficeKB.com

This is exactly what i want, got off an earlier thread, however, don't know
how to get it to save in the folder "Problem vehicles". It keeps saving in
My documents

Used the record macro to get this, but not sure where to place in codeing
"C:\Documents and Settings\Brian\My Documents\Brian's\problem vehicles"

where do I copy the above, to save the sheet in "folder "Problem Veehicles

sub save_date()
Dim fname
fname = worksheets("sheet1").range("A1").value
fname = fname & ".xls"
ActiveWorkbook.SaveAs Filename:=fname
end sub

please help

brian
 
sub save_date()

dim fname as string
dim pname as string

pname = "C:\Documents and Settings\Brian\My Documents" &_
"\Brian's\problem vehicles\" '<-note the final \

fname = worksheets("sheet1").range("A1").value
fname = fname & ".xls"
ActiveWorkbook.SaveAs Filename:=pname & fname

end sub
 
thanks dave

regards

Dave said:
sub save_date()

dim fname as string
dim pname as string

pname = "C:\Documents and Settings\Brian\My Documents" &_
"\Brian's\problem vehicles\" '<-note the final \

fname = worksheets("sheet1").range("A1").value
fname = fname & ".xls"
ActiveWorkbook.SaveAs Filename:=pname & fname

end sub
This is exactly what i want, got off an earlier thread, however, don't know
how to get it to save in the folder "Problem vehicles". It keeps saving in
[quoted text clipped - 15 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top