Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 99
Default Saving templete / workbook to a specific drive / file...trying again

The macro below works but... it’s a bit confusing for the end user in
that I does save the file name as A1 to the right drive / directory –
however it does show the end users it has done that.

It will also change it again if A1 is changed but its not clear to the
end user that the save has been done.

When the save as option is chosen in the file menu the save takes
place but in the Save As box it shows the previous file name etc.
Also if it’s a new sheet from a template it defaults to “Documents”
and I need it to default to the sheet in “my drive”

My approach to this problem might be all wrong.

What I want is to prevent the “end user” from messing up the original
sheet – but to be able to fill it in then save it with a name and file
number and leave the original un changed. Quite often they ignore the
“read only” use the form add the data and then save it over the
original before noticing what they have done.

I could use a FORM but the sheet is very complex (in the back ground)
and end users are OK with filling in their part of the sheet without
too much trouble – so a FORM is out.

NOTE – the end users are not very smart…

Thanks John

Thanks to Don Guillett for the macro below.

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)


mydrive = "H:"
mydir = "Temp"
myname = Sheets("sheet1").Range("a1")
ms = mydrive & "\" & mydir & "\" & myname & ".xls"
ActiveWorkbook.SaveCopyAs Filename:=ms
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default Saving templete / workbook to a specific drive / file...trying again

Hi John

Add theese two lines to your macro:

Cancel=True
ActiveWorkbook.Saved=True

I would also add a message box to inform user that the workbook has
been saved:

msg = MsgBox("The workbook has been saved as " & ms, vbInformation +
vbOKOnly, "Save As")

Regards,
Per

On 2 Okt., 19:55, Johnnyboy5 wrote:
The macro below works but... it’s a bit confusing for the end user in
that I does save the file name as A1 to the right drive / directory –
however it does show the end users it has done that.

It will also change it again if A1 is changed but its not clear to the
end user that the save has been done.

When the save as option is chosen in the file menu *the save takes
place but in the Save As box it shows the previous file name etc.
Also *if it’s a new sheet from a template it defaults to “Documents”
and I need it to default to the sheet in “my drive”

My approach to this problem might be all wrong.

What I want is to prevent the “end user” from messing up the original
sheet – but to be able to fill it in then save it with a name and file
number and leave the original un changed. *Quite often they ignore the
“read only” use the form add the data and then save it over the
original before noticing what they have done.

I could use a FORM but the sheet is very complex (in the back ground)
and end users are OK with filling in their part of the sheet without
too much trouble – so a FORM is out.

NOTE – the end users are not very smart…

Thanks *John

Thanks to Don Guillett *for the macro below.

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)

mydrive = "H:"
mydir = "Temp"
myname = Sheets("sheet1").Range("a1")
ms = mydrive & "\" & mydir & "\" & myname & ".xls"
ActiveWorkbook.SaveCopyAs Filename:=ms
End Sub


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 99
Default Saving templete / workbook to a specific drive / file...trying again

On 2 Oct, 20:43, Per Jessen wrote:
Hi John

Add theese two lines to your macro:

Cancel=True
ActiveWorkbook.Saved=True

I would also add a message box to inform user that the workbook has
been saved:

msg = MsgBox("The workbook has been saved as " & ms, vbInformation +
vbOKOnly, "Save As")

Regards,
Per

On 2 Okt., 19:55, Johnnyboy5 wrote:



The macro below works but... it’s a bit confusing for the end user in
that I does save the file name as A1 to the right drive / directory –
however it does show the end users it has done that.


It will also change it again if A1 is changed but its not clear to the
end user that the save has been done.


When the save as option is chosen in the file menu *the save takes
place but in the Save As box it shows the previous file name etc.
Also *if it’s a new sheet from a template it defaults to “Documents”
and I need it to default to the sheet in “my drive”


My approach to this problem might be all wrong.


What I want is to prevent the “end user” from messing up the original
sheet – but to be able to fill it in then save it with a name and file
number and leave the original un changed. *Quite often they ignore the
“read only” use the form add the data and then save it over the
original before noticing what they have done.


I could use a FORM but the sheet is very complex (in the back ground)
and end users are OK with filling in their part of the sheet without
too much trouble – so a FORM is out.


NOTE – the end users are not very smart…


Thanks *John


Thanks to Don Guillett *for the macro below.


Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)


mydrive = "H:"
mydir = "Temp"
myname = Sheets("sheet1").Range("a1")
ms = mydrive & "\" & mydir & "\" & myname & ".xls"
ActiveWorkbook.SaveCopyAs Filename:=ms
End Sub


Thanks Per nearly there.

one issue - the very top of the Excel screen on the left hand side
still shows the original name.

john
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 99
Default Saving templete / workbook to a specific drive / file...trying again

On 2 Oct, 20:43, Per Jessen wrote:
Hi John

Add theese two lines to your macro:

Cancel=True
ActiveWorkbook.Saved=True

I would also add a message box to inform user that the workbook has
been saved:

msg = MsgBox("The workbook has been saved as " & ms, vbInformation +
vbOKOnly, "Save As")

Regards,
Per

On 2 Okt., 19:55, Johnnyboy5 wrote:



The macro below works but... it’s a bit confusing for the end user in
that I does save the file name as A1 to the right drive / directory –
however it does show the end users it has done that.


It will also change it again if A1 is changed but its not clear to the
end user that the save has been done.


When the save as option is chosen in the file menu *the save takes
place but in the Save As box it shows the previous file name etc.
Also *if it’s a new sheet from a template it defaults to “Documents”
and I need it to default to the sheet in “my drive”


My approach to this problem might be all wrong.


What I want is to prevent the “end user” from messing up the original
sheet – but to be able to fill it in then save it with a name and file
number and leave the original un changed. *Quite often they ignore the
“read only” use the form add the data and then save it over the
original before noticing what they have done.


I could use a FORM but the sheet is very complex (in the back ground)
and end users are OK with filling in their part of the sheet without
too much trouble – so a FORM is out.


NOTE – the end users are not very smart…


Thanks *John


Thanks to Don Guillett *for the macro below.


Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)


mydrive = "H:"
mydir = "Temp"
myname = Sheets("sheet1").Range("a1")
ms = mydrive & "\" & mydir & "\" & myname & ".xls"
ActiveWorkbook.SaveCopyAs Filename:=ms
End Sub


Oh. how can i save it as a template - as the macro runs before I can
save it as a template

John
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 82
Default Saving templete / workbook to a specific drive / file...trying again

John

Why don't you use a template (xlt) workbook in the first place?

Then when the user opens it they will actually create a new workbook
based on the template.

They can then do whatever the need/want with the new workbook without
affecting the (original) template.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 99
Default Saving templete / workbook to a specific drive / file...trying again

On 3 Oct, 08:23, norie wrote:
John

Why don't you use a template (xlt) workbook in the first place?

Then when the user opens it they will actually create a new workbook
based on the template.

They can then do whatever the need/want with the new workbook without
affecting the (original) template.


Hi

because if they use a template its default save is to "Documents" and
I need the results saved to a different drive / folder. I am trying
to avoid them having to use a macro and that all the change of drive
stuff etc takes place in the back ground. Any ideas ?

John
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
Saving templete / workbook to a specific drive / file Johnnyboy5[_2_] Excel Programming 1 October 1st 10 12:00 PM
Saving Excel File to a Network Drive Jason Excel Discussion (Misc queries) 2 March 2nd 10 05:16 PM
saving office 2003 file to share drive Lisa Excel Discussion (Misc queries) 1 December 4th 08 08:49 PM
Saving Workbook in a shared drive al_ba Excel Programming 8 October 4th 08 01:18 PM
save workbook created from templete to a specific folder imh Excel Discussion (Misc queries) 1 June 2nd 06 11:29 PM


All times are GMT +1. The time now is 02:19 AM.

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

About Us

"It's about Microsoft Excel"