PDA

View Full Version : Solved: save as excel file automatically



rajagopal
05-24-2007, 01:36 AM
Upon opening the excel file, the user should get Save As menu to save the file.
Is there any worksheet_change codes to do it?

Bob Phillips
05-24-2007, 01:41 AM
Private Sub Workbook_Open()
Dim sFilename As String

Do
sFilename = Application.GetSaveAsFilename(fileFilter:="Excel Files (*.xls), *.xls")
If sFilename <> "False" Then
ThisWorkbook.SaveAs sFilename
End If
Loop Until sFilename <> ""

End Sub


This is workbook event code.
To input this code, right click on the Excel icon on the worksheet
(or next to the File menu if you maximise your workbooks),
select View Code from the menu, and paste the code

rajagopal
05-24-2007, 03:37 AM
I didn't get any SAVE AS menu.
It should execute automatically like worksheet change event.
When user updates cell d8, the SAVE AS menu should popup.

rajagopal
05-24-2007, 03:39 AM
Sorry. I get the SAVE AS menu.
But it should be activated when the user udpates the cell D8.

Bob Phillips
05-24-2007, 05:23 AM
And I was supposed to know that?

Veekay2007
05-24-2007, 05:24 AM
try this code.

application.Dialogs(xlDialogSaveAs).Show

will bring the Save As dialog on the screen

zv735
05-24-2007, 08:24 AM
Something Like That

See Att. File

rajagopal
05-24-2007, 08:59 PM
It works. thank you. Can you solve my query posted in the below link
http://www.vbaexpress.com/forum/showthread.php?t=12986&goto=newpost (http://www.vbaexpress.com/forum/showthread.php?t=12986&goto=newpost)
I hope i'll get the solution from you.

mdmackillop
05-25-2007, 10:34 AM
It works. thank you. Can you solve my query posted in the below link
http://www.vbaexpress.com/forum/showthread.php?t=12986&goto=newpost (http://www.vbaexpress.com/forum/showthread.php?t=12986&goto=newpost)
I hope i'll get the solution from you.
You haven't responded to the last post in that thread.

rajagopal
05-29-2007, 09:49 PM
I don't want the file to be saved for every update in the cell range.
The data entered in cell range D60:D69, J60:J69, L60:L69 has to be populated in another excel file (Action item tracker.xls) - please find the attached file.
When user reaches L69, a popup information "Action items are updated in action item tracker" should come.
Next time, when user creates another MOM in the same template,
the action items in cell range D60:D69 has to be auto populated in the same action item tracker.xls but on the next row to the previous last action item.
Hope i'm not confusing you.
Please help asap.

raj

rajagopal
05-29-2007, 09:51 PM
Please find the attachment action item tracker.xls here.