file names/directory

  • Thread starter Thread starter mika.
  • Start date Start date
M

mika.

When I use the SaveAs function as follows:

ActiveWorkbook.SaveAs Filename:="H:\A\B\Sept 10 2003
\Sept10-1.xls", AccessMode:=xlShared
.....when I open Sept10-1.xls, it says that it is shared,
but when I use:

ActiveWorkbook.SaveAs Filename:="Sept10-1.xls",
AccessMode:=xlShared
.....when I open Sept10-1.xls, it doesn't say that it is
shared.

How do I get it so that it saves to the current directory
without having to type in all that information?

Thanks.
 
Actually what I want is to make it always save to the
directory where the spreadsheet is in --> that is, i
always want it to be saving over itself. so no matter
where this spreadsheet is, i want it to alway save in
that current directory, which is why i don't want to
specify the actually directory. But this code:

ActiveWorkbook.SaveAs Filename:="Sept10-1.xls",
AccessMode:=xlShared

doesn't seem to save to the same directory...any ideas as
to why?

Thanks so much.
 
And this?

DirPath = ActiveWorkbook.Path
ChDrive DirPath
ChDir DirPath
ActiveWorkbook.SaveAs FileName:="Sept10-1.xls", AccessMode:=xlShared


"mika." <[email protected]> escreveu na mensagem
Actually what I want is to make it always save to the
directory where the spreadsheet is in --> that is, i
always want it to be saving over itself. so no matter
where this spreadsheet is, i want it to alway save in
that current directory, which is why i don't want to
specify the actually directory. But this code:

ActiveWorkbook.SaveAs Filename:="Sept10-1.xls",
AccessMode:=xlShared

doesn't seem to save to the same directory...any ideas as
to why?

Thanks so much.
 
Back
Top