Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
SU
 
Posts: n/a
Default Saving a file using a specific name in a cell

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

  #2   Report Post  
Gord Dibben
 
Posts: n/a
Default

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

On Thu, 24 Feb 2005 10:03:11 -0800, "SU" wrote:

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


  #3   Report Post  
SU
 
Posts: n/a
Default

The Program Error prompt is shown followed by closure of Excel.

"Gord Dibben" wrote:

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

On Thu, 24 Feb 2005 10:03:11 -0800, "SU" wrote:

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



  #4   Report Post  
SU
 
Posts: n/a
Default

I have sheet1 and have a name in cell A1.

"Gord Dibben" wrote:

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

On Thu, 24 Feb 2005 10:03:11 -0800, "SU" wrote:

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



  #5   Report Post  
Gord Dibben
 
Posts: n/a
Default

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

On Thu, 24 Feb 2005 11:33:02 -0800, "SU" wrote:

The Program Error prompt is shown followed by closure of Excel.

"Gord Dibben" wrote:

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

On Thu, 24 Feb 2005 10:03:11 -0800, "SU" wrote:

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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I use a cell as a referance to a file in a lookup statemen. SarahP Excel Worksheet Functions 1 January 27th 05 11:09 PM
Saving file to a specific folder richkim2000 Excel Discussion (Misc queries) 1 January 25th 05 11:11 PM
Read Text File into Excel Using VBA Willie T Excel Discussion (Misc queries) 13 January 8th 05 12:37 AM
Using Jet to read excel file returns blank for last cell - sometim Ron Excel Discussion (Misc queries) 1 December 9th 04 08:21 AM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 01:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"