Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I got it working as a command button. Thank you very much!
"Simon Lloyd" wrote: You could use a command button or menu item, you could even us it like this Code: -------------------- Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) ActiveWorkbook.SaveCopyAs "C:\Users\Simon\Desktop" & (Sheets("Sheet1").Range("A1").Value & ".xls") End Sub -------------------- or Code: -------------------- Private Sub Workbook_BeforeClose(Cancel As Boolean) ActiveWorkbook.SaveCopyAs "C:\Users\Simon\Desktop" & (Sheets("Sheet1").Range("A1").Value & ".xls") End Sub -------------------- you would probably want to use the latter! dvya;249803 Wrote: How would i install this code? Thank you, "Simon Lloyd" wrote: Rather than direct them to a folder why not just have the workbook save ther only? Like this: Code: -------------------- ActiveWorkbook.SaveCopyAs "C:\Users\Simon\Desktop" & (Sheets("Sheet1").Range("A1").Value & ".xls") -------------------- dvya;248761 Wrote: Ive created a template for my office staff to use to create invoices. Im looking for a way that when they choose save - 1) the box that opens up will automatically be directed to a certain folder 2) and the file name will be the contents of "A1". Thank You -- Simon Lloyd Regards, Simon Lloyd 'The Code Cage' ('The Code Cage' (http://www.thecodecage.com)) ------------------------------------------------------------------------ Simon Lloyd's Profile: 'The Code Cage Forums - View Profile: Simon Lloyd' (http://www.thecodecage.com/forumz/member.php?userid=1) View this thread: 'Save as - The Code Cage Forums' (http://www.thecodecage.com/forumz/sh...ad.php?t=69432) -- Simon Lloyd Regards, Simon Lloyd 'The Code Cage' (http://www.thecodecage.com) ------------------------------------------------------------------------ Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=69432 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Save, save as, page setup dimmed out in unprotected excel sheet? | Excel Discussion (Misc queries) | |||
Disable save, save as, but allow save via command button | Excel Programming | |||
How to diasble save and save as menu but allow a save button | Excel Programming | |||
Totally Disabling (^ save ) (Save as) and Save Icon Which code do I use: | Excel Programming | |||
Save As - Multiple Sheets fails to save as text file | Excel Programming |