Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Renaming an open workbook

I have an application that generates some data and launches a workbook named
setup.xls and places the data on the sheet for the user to have a report.

Once this has been done, I would like to rename the filled workbook with the
name of
of one the cell values, for example lets say that the value of "H5" is
"333-2323A"

I would like to rename the open work book as 333-2323A.xls

I am trying to prevent the original copy of setup.xls from being over
written everytime
it gets ran.

One other variation to this would be to have the vba and protection removed
for the renamed
open book since at this point it is just a data report and the vba is no
longer needed.

If anyone has any suggestions I am open...

Thanks,

Jeff W.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Renaming an open workbook

You simply save the workbook as another file anme:

Workbook.SaveAs "333-2323A.xls"


"Jeff W." wrote in message
...
I have an application that generates some data and launches a workbook
named
setup.xls and places the data on the sheet for the user to have a report.

Once this has been done, I would like to rename the filled workbook with
the name of
of one the cell values, for example lets say that the value of "H5" is
"333-2323A"

I would like to rename the open work book as 333-2323A.xls

I am trying to prevent the original copy of setup.xls from being over
written everytime
it gets ran.

One other variation to this would be to have the vba and protection
removed for the renamed
open book since at this point it is just a data report and the vba is no
longer needed.

If anyone has any suggestions I am open...

Thanks,

Jeff W.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Renaming an open workbook

Thank you for the responce, but

I guess I didnt do a good job of explaining.

I have another application open a work book named setup.xls then it runs
through it macros and the last thing that needs to be done is it looks in
the
H5 cell and re names the open file with that "value".xls

I dont want to save it cause we dont know where the user will want to put
it until they exit, we just need to re name the open book

So when they do exit it wont over write the setup.xls book

If I could get it to "rename" my work book and remove all the macros that
would be great, cause after the rename and ultimatly the save the user does
it becomes a simple datafile...

Thanks

Jeff W.


"Norman Yuan" wrote in message
...
You simply save the workbook as another file anme:

Workbook.SaveAs "333-2323A.xls"


"Jeff W." wrote in message
...
I have an application that generates some data and launches a workbook
named
setup.xls and places the data on the sheet for the user to have a report.

Once this has been done, I would like to rename the filled workbook with
the name of
of one the cell values, for example lets say that the value of "H5" is
"333-2323A"

I would like to rename the open work book as 333-2323A.xls

I am trying to prevent the original copy of setup.xls from being over
written everytime
it gets ran.

One other variation to this would be to have the vba and protection
removed for the renamed
open book since at this point it is just a data report and the vba is no
longer needed.

If anyone has any suggestions I am open...

Thanks,

Jeff W.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Renaming an open workbook

You are going about this from the wrong end.

Save setup.xls as a Template and it can't be overwritten.

FileSave AsFile TypeTemplate(*.xlt)

Then instruct your users to click on that Template.

A new workbook will open based upon the setup.xlt template.

Users will fill in and manipulate data then save as any name they wish and to
where they want without affecting the original.

To get rid of the macros in the new workbook see Chip Pearson's site for
removing modules.

http://www.cpearson.com/excel/vbe.aspx


Gord Dibben MS Excel MVP

On Sun, 14 Oct 2007 13:05:55 -0500, "Jeff W." wrote:

So when they do exit it wont over write the setup.xls book

If I could get it to "rename" my work book and remove all the macros that
would be great, cause after the rename and ultimatly the save the user does
it becomes a simple datafile...


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Renaming an open workbook

When I do this, then I open that temple manually and try try to run the
macros that do all the work for them, it errors out with

runtime error 76
path not found

It will run as a xls but not as a xlt with out error

I checked all my vba and there arent any references to ".xls" or even the
file name "setup" so I'm not sure where this path error is coming from

<Jeff

"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
You are going about this from the wrong end.

Save setup.xls as a Template and it can't be overwritten.

FileSave AsFile TypeTemplate(*.xlt)

Then instruct your users to click on that Template.

A new workbook will open based upon the setup.xlt template.

Users will fill in and manipulate data then save as any name they wish and
to
where they want without affecting the original.

To get rid of the macros in the new workbook see Chip Pearson's site for
removing modules.

http://www.cpearson.com/excel/vbe.aspx


Gord Dibben MS Excel MVP

On Sun, 14 Oct 2007 13:05:55 -0500, "Jeff W."
wrote:

So when they do exit it wont over write the setup.xls book

If I could get it to "rename" my work book and remove all the macros that
would be great, cause after the rename and ultimatly the save the user
does
it becomes a simple datafile...




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
renaming a workbook serge T Excel Programming 6 October 22nd 07 09:57 AM
Renaming a workbook without saving Matt Excel Programming 3 May 22nd 06 11:07 AM
Workbook renaming billyb Excel Programming 3 May 31st 04 04:05 PM
Workbook renaming! aiyer[_21_] Excel Programming 1 May 12th 04 08:03 PM
Renaming workbook! aiyer[_20_] Excel Programming 1 May 11th 04 11:34 PM


All times are GMT +1. The time now is 10:58 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"