Saving a file using a specific name in a cell

S

SU

I would like to direct users to fill a cell in a sheet with their Login name.
The value of this cell will then be used as the filename to save the
spreadsheet.

Can anyone help me to automate this process!

I tried the following sub from a previous answer but it crashes my excel!

sub foo()
with activeworkbook
.saveas filename:=.worksheets("sheet1").range("A1").value
end with
end sub
 
G

Gord Dibben

Works for me.

Do you mean "crashes" as in shuts down?

Any error message(s)?

Do you have a sheet1?

Any invalid characters in A1?


Gord Dibben Excel MVP
 
S

SU

I have sheet1 and have a name in cell A1.

Gord Dibben said:
Works for me.

Do you mean "crashes" as in shuts down?

Any error message(s)?

Do you have a sheet1?

Any invalid characters in A1?


Gord Dibben Excel MVP
 
G

Gord Dibben

I don't see how the code would cause Excel to throw a Program Error then shut
down.

Any chance the users don't have permission to save to the default path?

On a Network?

Just started happening recently?


Gord
 

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

Top