Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On May 15, 3:39*pm, alex wrote:
On May 15, 12:43*pm, alex wrote: On May 15, 11:24*am, Susan wrote: last one, i promise http://groups.google.com/group/micro...rogramming/bro.... susan On May 15, 10:27*am, alex wrote: On May 14, 1:07*pm, alex wrote: Hi experts, using Excel '03... My company is trying to save its xls documents (and other MS docs) in a particular format; e.g., Program_Desc_Date_Initials. Is there a way to code Excel (possibly placing the code in Book.xlt) that prompts/asks the user (when the user executes SAVE or SAVE AS) to enter the appropriate program, description, date, and his/her initials. *I'm thinking four input boxes (one after the other). This data from the user would be concatenated and would form the file name (now located in the Save As dialog box). *The user would then simply choose a location. Thoughts? alex Can someone tell me if I posted this question to the wrong group? Thanks, alex- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - Thanks for your help Susan. *I'll take a look at these and see if I can extrapolate something. alex- Hide quoted text - - Show quoted text - I've got most of the code to work and pasted it below: Sub xlsSaveAs() Dim SaveName1 As String Dim SaveName2 As String Dim SaveName3 As String Dim SaveName4 As String Dim Why As Integer Why = MsgBox("Would You Like To Use Special Formatting?", vbYesNo, "File Formatting") * * * * * * If Why = vbYes Then * * * * * * * * * * SaveName1 = InputBox("PLEASE ENTER PROGRAM DESCRIPTION") * * * * * * * * * * Application.Dialogs(xlDialogSaveAs).Show SaveName1 * * * * * * Else * * * * * * * * * * Application.Dialogs(xlDialogSaveAs).Show * * End If End Sub I have a problem, however, with concatenating the results of all my input boxes. *I can show them; e.g.: If Why = vbYes Then * * * * * * * * * *SaveName1 = InputBox("PLEASE ENTER PROGRAM DESCRIPTION") * * * * * * * * * * SaveName2 = InputBox("PLEASE ENTER DESC") * * * * * * * * * * * SaveName3 = InputBox("PLEASE ENTER DATE") * * * * * * * * * * * * SaveName4 = InputBox("PLEASE ENTER INITIALS") but I cannot combine the results. I also thought about creating one UserForm with four textboxes. *I can call the Form, but I don't know enough to pull the user defined text from the textboxes. thoughts? alex- Hide quoted text - - Show quoted text - Hello all. Could someone tell me the code to extract the "User name" from Excel? Located under Tools | Options | General | Instead of requiring the user to enter his/her initials, I could concatenate the Program&_&Description&_&Date&_&User name. alex |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Save As Code | Excel Programming | |||
How to save my VBA-code | Excel Worksheet Functions | |||
Totally Disabling (^ save ) (Save as) and Save Icon – Which code do I use: | Excel Programming | |||
Placing a code before Save & Save As | Excel Programming | |||
SAVE AS code | Excel Programming |